OpenLayer Offline Manual

OpenLayer | Collision | IsCollision IsCollision
IsCollision()
Returns true if a collision has really happened. You can also use the conversion to boolean to test if a collision happened. See the examples how to use this. Examples Collision collision = ...; // Test if a collision really happened // if( collision.IsCollision() ) { allegro_message( "Collision!" ); } // The same as above by using the operator bool() // if( collision ) { allegro_message( "Collision!" ); } Other functions of the class Collision
GetPoint | Returns the exact point of the collision
GetSegment | Returns the specified colliding line segment
IsCollision | Returns true if a collision has really happened
GetNormal | Returns the normal of a colliding object at the collision point
GetAllPoints | Returns all collision points
GetAllSegments | Returns all pairs of colliding segments
Back to the main page of the manual Questions about IsCollision? Click here.