tembac Posted August 29, 2016 Share Posted August 29, 2016 Hi everyone, I have an animated sprite of a meteorite with it's tail. I need that the collisions are only for the rock and to be able to rotate the sprite with the movement direction. If I setup the body size like this: this.anchor.set(.55, .55); this.body.setSize(110, 110, 400, 350); The graphic and body collision is fine if the angle of rotation is 0. But I need to rotate the sprite around the anchor point and then the body is not on the desired position of the sprite. How can I fix this? Link to comment Share on other sites More sharing options...
tembac Posted August 29, 2016 Author Share Posted August 29, 2016 Found a solution I was calculating the anchor wrong. Now I found the exact anchor point on Photoshop and divided it with the file size: this.anchor.set(460 / 814, 400 / 814); Noid 1 Link to comment Share on other sites More sharing options...
Recommended Posts