Moment for body with multiple shapes

Official forum for the Chipmunk2D Physics Library.

Moment for body with multiple shapes

Postby X-0ut » Fri Dec 14, 2007 3:53 pm

I've been working on my game and ran into a minor detail.
For some complex objects I have to use multiple polys because the full object is convex.
So I break it down into convex shapes and attach them to the body.
But how would I workout the moment for multiple shapes? all the demo's seem to just use one shape to work it out.
X-0ut
 
Posts: 28
Joined: Tue Oct 02, 2007 5:02 am

Re: Moment for body with multiple shapes

Postby X-0ut » Fri Dec 14, 2007 3:55 pm

Nevermind, I see demo 6 shows you simply add them together.
X-0ut
 
Posts: 28
Joined: Tue Oct 02, 2007 5:02 am

Re: Moment for body with multiple shapes

Postby systlane » Tue Dec 25, 2007 6:52 am

adding didn't work for me.
calculating the average moment of inertia looked better, but i dont know if it's right...
systlane
 
Posts: 2
Joined: Tue Dec 25, 2007 6:49 am

Re: Moment for body with multiple shapes

Postby slembcke » Tue Dec 25, 2007 9:21 pm

The moment of inertia is additive. Averaging them is definitely not correct. What exactly are you doing?

Do the shapes overlap? What you do in that case depends on the circumstances. Is the shape meant to be a union of the two shapes or are the shapes actually separate?
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm

Re: Moment for body with multiple shapes

Postby systlane » Thu Dec 27, 2007 8:51 pm

Image
it's supposed to be some kind of an airship with a balloon

it consists of quad polyshapes, top and bottom parts are simulated by the same body.
systlane
 
Posts: 2
Joined: Tue Dec 25, 2007 6:49 am


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 1 guest