Jump to content

rotation of a sprite around a fixed point


avishek0307
 Share

Recommended Posts

sprite.position.rotate(fixedPoint.x, fixedPoint.y, a, true, distancePx);

Put that in an update function. Where a = the amount of degrees to rotate per update (try a value like 1 or 2 to start with) and distancePx is the distance of the sprite from the fixed point, in pixels.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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