Rotating space
-
- Posts: 2
- Joined: Sat Oct 27, 2012 6:49 pm
- Contact:
Rotating space
Is there any simple way to rotate all the objects on a space around a given point? thank you!
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Rotating space
If you just want the static parts to rotate and all the shapes are attached to a shared static body you could update the static body manually (position and velocity) each frame and then call cpSpaceReindexStatic(). If the static parts are never static ever, you should just use a rogue body instead. Depending on how many static things you have in your space, this could be really expensive though.
If you want to rotate *everything* in the space including all the dynamic objects, then you might as well just rotate the graphics instead. Nothing really would have moved, so just rotating the viewport/camera/whatever would be equivalent and much easier.
If you want to rotate *everything* in the space including all the dynamic objects, then you might as well just rotate the graphics instead. Nothing really would have moved, so just rotating the viewport/camera/whatever would be equivalent and much easier.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 19 guests