fix the bug that prevents the pd control forces/torques being added
This commit is contained in:
@@ -206,6 +206,14 @@ void btRigidBody::applyGravity()
|
||||
applyCentralForce(m_gravity);
|
||||
}
|
||||
|
||||
void btRigidBody::clearGravity()
|
||||
{
|
||||
if (isStaticOrKinematicObject())
|
||||
return;
|
||||
|
||||
applyCentralForce(-m_gravity);
|
||||
}
|
||||
|
||||
void btRigidBody::proceedToTransform(const btTransform& newTrans)
|
||||
{
|
||||
setCenterOfMassTransform(newTrans);
|
||||
|
||||
@@ -205,6 +205,8 @@ public:
|
||||
void saveKinematicState(btScalar step);
|
||||
|
||||
void applyGravity();
|
||||
|
||||
void clearGravity();
|
||||
|
||||
void setGravity(const btVector3& acceleration);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user