LandonSchropp Posted April 25, 2017 Share Posted April 25, 2017 I would like to change the point a sprite rotates around to the center of the sprite. I realize I can do this by calling sprite.anchor.set(0.5), but that also effectively changes the position of the sprite. Is there a way to change the rotation point of the sprite without affecting its position? I found the pivot property, but it also seems to have the same problem. Link to comment Share on other sites More sharing options...
end3r Posted April 25, 2017 Share Posted April 25, 2017 Not sure if that's what you a re looking for, but if I want to change the anchor and keep position the same, I do something like this: sprite.anchor.set(0.5,0.5); sprite.x += sprite.width*0.5; sprite.y += sprite.height*0.5; You are moving the sprite's position the amount of space it needs to stay in the exact same place, but with the new anchor. Link to comment Share on other sites More sharing options...
LandonSchropp Posted May 1, 2017 Author Share Posted May 1, 2017 Thanks for the reply @end3r! Your solution looks like the best way to accomplish this, but it's a bit of a bummer that I can't change the rotation point independent of the sprite's location. Still, I appreciate the help. Link to comment Share on other sites More sharing options...
Recommended Posts