phent_enable (ENTITY* entity, var enable);

This function temporarily enables/ disables an entity for physics. If more than one entity is to be changed, it's more efficient to use ph_selectgroup instead.

Parameters:

entity the entity to be affected
enable a value of 1 enables the entity, 0 disables the entity

Returns:

1 if successful, 0 otherwise.

Speed:

Medium

Edition:

 C   P 

Example:

// disable physics entity so we can manually alter its position
phent_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.
phent_enable( me, 1 );

See also:

ph_selectgroup, phent_setgroup