|
pXent_enable ( entity, var enable); |
This function recreates/ temporary deletes an Actor for physics. If more than one Actor is to be changed, it's more efficient to use pX_selectgroup instead.
|
Parameters: |
|
entity |
registered Entity pointer (Actor) or unregistered Actor |
|
enable |
a value of 1 recreates the Actor, 0 deletes the Actor |
|
Returns: |
1 if successful, 0 otherwise.
|
Remarks: |
All Actors that get deleted are temporarily saved in the pXent.dll with index, body, hull, and scale size, and can be recreated with this function.
|
Speed: |
Medium
// disable physics entity so we can manually alter its position. pXent_enable( me, 0 ); vec_set(my.x, newPosition ); vec_set(my.pan, newOrientation ); // re-enable entity, this will inform the physics system that position/orientation has changed. pXent_enable( me, 1 );