OpenLayer Offline Manual

OpenLayer | Collision | GetNormal GetNormal
Vec2D GetNormal( | CollidingObject objectID )
Returns the normal of a colliding object at the collision point. ObjectID should be either one of these: - OBJ_A: The first colliding object - OBJ_B: The second colliding object This function returns the same as GetSegment( objectID ).GetNormal(). However this function may execute a lot faster when the segment information isn't meaningful (the colliding objects don't consist of line segments). Examples Collision collision = ...; // Get the normal of the first colliding object at the collision point // Vec2D objANormal = collision.GetNormal( OBJ_A ); 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 GetNormal? Click here.