I've made a very similar shape when messing around with chipmunk in the past, but with only three shapes attached to a body... I've attached an image to show the arrangement of shapes I used.
From what I understand, if shapes are attached to the same body they don't generate collisions, so any amount of overlapping should be fine. (Please someone correct me if this is a horrible mistake!)
It's only a very, very minor optimisation... but every little counts! (I've never coded for the iPhone before, but I imagine it helps to squeeze everything you can out of it.)
Create a rotating wheel
-
- Posts: 33
- Joined: Mon Mar 30, 2009 3:06 am
- Contact:
Re: Create a rotating wheel
[url=http://www.xboxlc.com/profile/Rawlyn][img]http://www.xboxlc.com/cards/sig/black/Rawlyn.jpg[/img][/url]
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Create a rotating wheel
Yep, you can attach as many overlapping shapes as you want to a body. There is an early exit for this, so it shouldn't use very much CPU considering these non-collisions.
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 33 guests