scope2229 Posted June 23, 2018 Share Posted June 23, 2018 I was wondering if its possible to have my sprite rotation change depending on the angle of the sprite. When you set physics arcade debug to true, and you have enabled arcade physics on said sprite, you get a sprite with a purple box around it depicting its boundaries for collision etc. when you move the sprite around you then get a green line that appears in the direction of travel. Is it possible to set the rotation of the sprite to follow the green line. Eg if i have a arrow >>-----------> like this but picture form, how could i rotate that without the obvious animation functions and draw at each angle around a clock record the frame amount sizes and set accordingly. Link to comment Share on other sites More sharing options...
samme Posted June 23, 2018 Share Posted June 23, 2018 sprite.angle = sprite.body.angle; scope2229 1 Link to comment Share on other sites More sharing options...
scope2229 Posted June 24, 2018 Author Share Posted June 24, 2018 thank you this worked perfectly. Link to comment Share on other sites More sharing options...
Recommended Posts