BGE patch 18065: gameobj mass writeable + setmass actuator. This patch allows to change the mass of a dynamic or rigid body object during the game. Two methods are available: in a Python script by setting the mass attribute of the game object; by logic brick with the Edit Object->Dynamics->Set Mass actuator. The mass can only be set on dynamic objects and must be a positive floating point value.

This commit is contained in:
Benoit Bolsee
2009-01-14 22:33:39 +00:00
parent 00c12e0906
commit 509ca83ef1
12 changed files with 53 additions and 13 deletions

View File

@@ -205,6 +205,10 @@ MT_Scalar KX_SumoPhysicsController::GetMass()
return SumoPhysicsController::getMass();
}
void KX_SumoPhysicsController::SetMass(MT_Scalar newmass)
{
}
MT_Scalar KX_SumoPhysicsController::GetRadius()
{
return SumoPhysicsController::GetRadius();