pXent_setmass (ENTITY* entity,
var mass)
pXent_getmass (ENTITY* entity)
Sets
resp. returns the entity's physical mass. A definition of mass is "resistance
to change in velocity". By increasing an object's mass you
will have to use a stronger force (or torque) to make them move, or
to stop them from moving.
Parameters:
entity |
registered Entity pointer (Actor) |
mass
|
Mass of the object. |
Returns:
Entity mass if successful, 0
otherwise.
Remarks:
- The
mass is automatically set by physX from the entity shape and size, however you can change it with
this function.
- As the entity size depends on the world scale (pX_setunit), the mass also depends on it.
Speed:
Fast
Example:
pXent_setmass(my, 50);
See also:
Xent_settype, pXent_setmassoffset