Bodies crushed by gravity

General discussion about Box2D tutorials
Post Reply
blakey87
Posts: 28
Joined: Wed Jan 09, 2013 7:57 pm

Bodies crushed by gravity

Post by blakey87 »

I now have a walking biped animated by keyframes, with code based on the robot arm blog. it has :
https://www.youtube.com/watch?v=N5Ou-5iPgcc

Linear dampening set to 1 for all bodies.
Angular dampening set to 1 for all bodies.
Gravity scale set 0 for all bodies.

I think I know the answer to this, but I would like some advice on why this may be occurring, it seems like, when I set gravity scale to 1, all bodies appear to get pulled down by gravity creating a mess of bodies all stuck to the ground, what can I do to keep bodies upright in the correct positions when walking?
iforce2d
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Bodies crushed by gravity

Post by iforce2d »

When a joint corrects itself, the heavier bodies tend to push the lighter bodies into position. In my biped I had to make the legs really heavy, and other parts getting lighter toward the top of the structure. Not sure what else could be the problem...
blakey87
Posts: 28
Joined: Wed Jan 09, 2013 7:57 pm

Re: Bodies crushed by gravity

Post by blakey87 »

Great thanks :), this fixed the crushing issue!

I also had to decrease gravity, he drops down stays upright, but bounces a lot when walking lol

I see a lot of tweaking ahead
Post Reply