When a robot collides with another object, the _cldheading variable is set to the heading of the other object. Values range from 0 to 359 inclusive. Robots can collide with energy missiles, other robots, cookies, mines, and walls. When a robot collides with an object that is moving, _cldheading is set to the direction of that object's movement. Because of sliding, this may not be the direction that object is facing. When a robot collides with an object that is stationary, _cldheading is set to the direction that object is facing. Non-movable objects such as walls, cookies, and mines are always facing 0 degrees.
When a robot collides with another object it can also obtain a bearing to the center of the other object. The _cldbearing variable provides this information. The illustration below shows both the _cldheading and _cldbearing values during a collision.
_cldbearing, _cldenergy, _cldid, _cldteamid, _cldrobot, _cldmissile, _cldcookie, _cldmine, _cldwall, _heading