_heading
Value Type
| numeric [0-359] |
Description
Contains a robot's heading. Values range from 0 to 359 inclusive. A _heading of 0 is towards the top of the arena, or map north. When a robot is moving, _heading is set to the direction of the robot's movement. Because of sliding, this may not be the direction a robot is facing. When a robot is not moving, _heading is set to the direction a robot's body is facing.
Use the _bodyaim variable to determine the direction a robot's body is facing. When a robot is sliding, _bodyaim and _heading may have different values. When a robot is stationary, _bodyaim and _heading are the same.
See arena attributes for a description of angles.
See Also