Rotate body around a point
Rotate body around a point
Can i specify a point to rotate a body around in real time or can i only rotate it around its local 0,0 point?
Re: Rotate body around a point
Use trig.
Re: Rotate body around a point
Trig is all very nice but the setAngle() function only takes one argument, the angle. How can I rotate a body around a point other than local 0,0?
The only way i can see to do this is to destroy all the shapes on the body, recreate the shapes in the position that coresponds to where i want to rotate, and then shift the body in the opposite direction to how i effectively shifted the shapes. That feels like a total bodge, is there a better way?
The only way i can see to do this is to destroy all the shapes on the body, recreate the shapes in the position that coresponds to where i want to rotate, and then shift the body in the opposite direction to how i effectively shifted the shapes. That feels like a total bodge, is there a better way?
Who is online
Users browsing this forum: No registered users and 37 guests