As a response to issue [#28483] "Enable/Disable Rigid Body actuator do nothing" reported by Jean-Francois Gallant (pyroevil), I'm adding preliminary support to enable and disable rigid body physics on dynamic objects. This is can be done via the Edit Object Actuator or through KX_GameObject.enableRigidBody() and KX_GameObject.disableRigidBody(). Thanks to Sergej Reich for his help with the patch.

This commit is contained in:
Mitchell Stokes
2012-07-09 04:57:21 +00:00
parent 4ff0efd5a2
commit 9d73cbf2c4
5 changed files with 21 additions and 27 deletions

View File

@@ -229,6 +229,8 @@ struct CcdConstructionInfo
:m_localInertiaTensor(1.f, 1.f, 1.f),
m_gravity(0,0,0),
m_scaling(1.f,1.f,1.f),
m_linearFactor(0.f, 0.f, 0.f),
m_angularFactor(0.f, 0.f, 0.f),
m_mass(0.f),
m_clamp_vel_min(-1.f),
m_clamp_vel_max(-1.f),
@@ -292,6 +294,8 @@ struct CcdConstructionInfo
btVector3 m_localInertiaTensor;
btVector3 m_gravity;
btVector3 m_scaling;
btVector3 m_linearFactor;
btVector3 m_angularFactor;
btScalar m_mass;
btScalar m_clamp_vel_min;
btScalar m_clamp_vel_max;