The Force Mode determines if the force is to be conventional or impulsive.
mode |
NX_FORCE = has unit of mass * distance/
time^2 NX_IMPULSE = has unit of mass * distance /time (default) NX_VELOCITY_CHANGE = has unit of distance / time (mass independent) NX_SMOOTH_IMPULSE = same as NX_IMPULSE but the effect is applied over all substeps. NX_SMOOTH_VELOCITY_CHANGE = same as NX_VELOCITY_CHANGE but the effect is applied over all substeps NX_ACCELERATION = has unit of distance/ time^2, i.e. an acceleration |
1 if successful, 0 otherwise.
Fast
pX_setforcemode(NX_FORCE); pXent_addforcecentral ( entity, vForce); // using mass * distance/ time^2 pX_setforcemode(NX_IMPULSE); pXent_addexplosion ( entity, vPos, force, radius ); // using mass * distance /time
pXent_addexplosion, pXent_addforcecentral, pXent_addforceglobal, pXent_addforcelocal