Wouldn't it be simpler to keep the origin as the center and have another sprite for the death animation?
Or leave it as is and when you change to the death animation just move the sprite?
You can use a little math to rotate a sprite around any point if you wish to do that instead.
https://www.siggraph.org/education/mate ... 2drota.htm
global number centerx= 100
global number centery= 100
global number ang= 10
every tick
--- sprite: rotate ang degrees clockwise
---- sprite: set position to ( (self.x-centerx)*cos(ang)-(self.y-centery)*sin(ang)+centerx, (self.x-centerx)*sin(ang)+(self.y-centery)*cos(ang)+centery )
Sir,
I am very happy to find this post it helped me a lot , but this helped me to turn right using an imagepoint but it does not work for turning left and am having real trouble in setting up the equation for the same.
i thought making it negative would do it but nope!
Can you please please help me and post an equation for Left Rotation ?
It would be very helpful as i have spent all day on it and haven't go it working yet!