Jump to content

Rotate body position with sprite angle


Recommended Posts

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


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...