pXent_setbodyflag(ENTITY* entity, var BodyFlag, var on)

pXent_setbodyflagall(var BodyFlag, var on)

This sets or resets a particular body flag for a physics entity resp. for all registered physics entities.

Parameters:

entity Registered entity pointer (actor).
BodyFlag NX_BF_DISABLE_GRAVITY - disables gravity.
NX_BF_FROZEN_POS_X
- disables a certain axis.
NX_BF_FROZEN_POS_Z
NX_BF_FROZEN_POS_Y
NX_BF_FROZEN_ROLL
NX_BF_FROZEN_PAN
NX_BF_FROZEN_TILT
NX_BF_FROZEN_POS
- disables y, y, z.
NX_BF_FROZEN_ROT
- disables pan, tilt, roll.
NX_BF_KINEMATIC
- activates kinematic control.
NX_BF_FILTER_SLEEP_VEL
NX_BF_ENERGY_SLEEP_TEST
on 1 for setting, 0 for resetting the flag

Returns:

Nonzero if successful, 0 otherwise.

Remarks:

Speed:

Fast

Example:

pXent_setbodyflag (my, NX_BF_DISABLE_GRAVITY,1); // no gravity for the my entity only
pXent_setbodyflagall (NX_BF_DISABLE_GRAVITY,1); // no gravity for all entities

See also:

pXent_settype, pXent_move