pXent_setgroup (
entity, var group)
Sets
the entity's physics collision group, and also its group parameter. Physics collision detection is disabled for objects of the same group number,
except for groups 0 and 1. Thus if you want two objects to not have
collision detection with each other, set them to the same group of
2 or higher.
Parameters:
entity |
registered Entity pointer (Actor) |
group |
new collision group number of the object, 2 or above |
Returns:
Nonzero if successful, 0
otherwise.
Remarks:
- Groups 0 and 1 are reserved. New physics objects are always assigned to group 1,
yet can also collide with each other.
Speed:
Fast
Example:
// player collides with bot and forcefield, but bot can walk through the forcefield
pXent_setgroup( player, 2 );
pXent_setgroup( forcefield, 4 );
pXent_setgroup( patrolling_bot, 4 );
See also:
pX_setgroupcollision