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:


Speed:

Medium

Example:

// 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 );

See also:

pX_selectgroup, pXent_setgroup