Moment for body with multiple shapes

Official forum for the Chipmunk2D Physics Library.
Post Reply
X-0ut
Posts: 28
Joined: Tue Oct 02, 2007 5:02 am
Contact:

Moment for body with multiple shapes

Post by X-0ut »

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
Contact:

Re: Moment for body with multiple shapes

Post by X-0ut »

Nevermind, I see demo 6 shows you simply add them together.
systlane
Posts: 2
Joined: Tue Dec 25, 2007 6:49 am
Contact:

Re: Moment for body with multiple shapes

Post by systlane »

adding didn't work for me.
calculating the average moment of inertia looked better, but i dont know if it's right...
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Moment for body with multiple shapes

Post by slembcke »

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/
systlane
Posts: 2
Joined: Tue Dec 25, 2007 6:49 am
Contact:

Re: Moment for body with multiple shapes

Post by systlane »

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.
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests