Hi,
Is it possible to disable the gravity effect for 1 body ?
It is usefull for some physics simulation for creating flying objects : the entire world is under gravity but the flying object.
Thank you for your help
Per body gravity enable/disable
-
- Posts: 34
- Joined: Tue Mar 04, 2008 3:16 pm
Re: Per body gravity enable/disable
Yes, just use btRigidbody::setGravity(). The parameter should be a btVector3 with length 0.
-
- Posts: 35
- Joined: Mon Jul 20, 2009 12:58 pm
Re: Per body gravity enable/disable
Thank you it works !
It must be done AFTER adding the body in the world (m_dynamicsWorld->addRigidBody(_internalbody);), because it is not taken in account instead.
Thanks
It must be done AFTER adding the body in the world (m_dynamicsWorld->addRigidBody(_internalbody);), because it is not taken in account instead.
Thanks