Hi all,I want to set gravity to 0 use dynamicsWorld->setGravity(btVector3(0,0,0));
but it's unuseful ,any one knows how to do?
How to Cancel gravity
-
- Posts: 225
- Joined: Wed Jan 07, 2009 11:43 am
- Location: London
Re: How to Cancel gravity
Is it not working?
From what I remember you have to set the world gravity before you add objects to it otherwise they won't get the new value and you'll have to go through and adjust them by hand.
From what I remember you have to set the world gravity before you add objects to it otherwise they won't get the new value and you'll have to go through and adjust them by hand.
-
- Posts: 20
- Joined: Fri Feb 19, 2010 7:09 pm
Re: How to Cancel gravity
From what I remember the world's gravity is been copied to every new body you add to the world. Maybe you need to iterate all objects and set the new gravity yourself.
-
- Posts: 14
- Joined: Wed Apr 28, 2010 3:09 pm
Re: How to Cancel gravity
My encounter with gravity was finding that a rigid body's gravity is set to the world's default gravity when it is added to the dynamics world. If you want an individual rigid body to have a different gravity, you must change it after you have added it to the world.