Object acts weird and keeps upright.

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Object acts weird and keeps upright.

Postby BoingBoing » Sun Oct 04, 2009 4:37 pm

When an object touches the ground it tries to keep upright.

It seems as if there is a big weight attached to the bottom of the object.

Video (Might want to turn your volume down.):
http://www.youtube.com/watch?v=UgqKzvFu5BY
BoingBoing
 
Posts: 11
Joined: Sun Oct 04, 2009 4:15 pm

Re: Object acts weird and keeps upright.

Postby agi_shi » Sun Oct 04, 2009 4:43 pm

This is happening because the model is probably centered at the bottom of its feet, meaning the center of mass ends up not in the center of the object but at it's feet. That will make it act like a buoy or something of the sort. You can adjust the center of mass like so:
Code: Select all
            float i[3], com[3];
            // calculate inertia coefficients as well as the "actual" center of mass
            NewtonConvexCollisionCalculateInertialMatrix(collision, i, com);
            // set the "actual" center of mass
            NewtonBodySetCentreOfMass(body, com);
agi_shi
 
Posts: 263
Joined: Fri Aug 17, 2007 6:54 pm

Re: Object acts weird and keeps upright.

Postby BoingBoing » Sun Oct 04, 2009 6:33 pm

Wow thanks, this is much better.
BoingBoing
 
Posts: 11
Joined: Sun Oct 04, 2009 4:15 pm


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 11 guests

cron