MPhysicsProperties
MPhysicsProperties is a class used by MOEntity.
The class is defined in the MOEntity source code itself.
This class has and can set the MPhysicsConstraint.
MPhysicsProperties contains all the properties that will be used by the physics engine.
These properties can also be edited in the Maratis Editor.
The properties are mere value holders for the physics engine. This means that editing them when the game is already started will have no effect at all. The properties take effect only when the scene prepares the physics (MScene::preparePhysics) creating the collision objects for every entity.
However you can apply the new values using these methods of MPhysicsContext:
Another option is to reload all the physics properties of the entity using MScene::prepareCollisionShape and MScene::PrepareCollisionObject.
Contents |
Source code
API
constraint
deleteConstraint
[...]
createConstraint
[...]
getConstraint
[...]
Shape ID
setShapeId
[...]
getShapeId
[...]
Collision object ID
The ID of the very collision object used by MPhysicsContext. See the introduction of this page.
setCollisionObjectId
[...]
getCollisionObjectId
[...]
Collision shape
setCollisionShape
[...]
getCollisionShape
[...]
Ghost
setGhost
[...]
isGhost
[...]
Mass
setMass
[...]
getMass
[...]
Friction
setFriction
[...]
getFriction
[...]
Restitution
setRestitution
[...]
getRestitution
[...]
Linear damping
setLinearDamping
[...]
getLinearDamping
[...]
Angular damping
setAngularDamping
[...]
getAngularDamping
[...]
Angular factor
setAngularFactor
[...]
getAngularFactor
[...]
Linear factor
setLinearFactor
[...]
getLinearFactor
[...]