ArcBasicDocs

Collisions

Enables collisions between types.

Collisions ( src_type,dest_type,method,response )

Parameters

src_type
the collision type of the entities that move, such as 1 for the player.
dest_type
the collision type they run into, such as 2 for the walls.
method
how to test: 1 for sphere against sphere (both use EntityRadius); 2 for sphere against the triangles of a mesh, exact for walls, floors and terrain; 3 for sphere against a box set with EntityBox.
response
what to do on hitting: 1 to stop dead; 2 to slide along the surface, the usual choice for walking; 3 to slide, but not slip down slopes while standing on them.

Description

Sets up what happens when entities of one collision type run into entities of another. Give entities a type with EntityType, set up the pairs once, then every UpdateWorld stops or slides the moving entities against what they hit. Only the first type moves under this rule; the second is what it runs into.

See also