Repository navigation
Turns
imshooter edited this page Oct 23, 2026
·
1 revision
A3D_GetRouteTurn and A3D_GetRouteProgress give the turns of a route as an A3D_TURN, by the angle between the road before the junction and the road after it.
| Turn | Value | Angle |
|---|---|---|
A3D_TURN_NONE |
0 |
No turn is left, the end comes next |
A3D_TURN_SLIGHT_LEFT |
1 |
25 to 60 degrees to the left |
A3D_TURN_LEFT |
2 |
60 to 120 degrees to the left |
A3D_TURN_SHARP_LEFT |
3 |
120 to 160 degrees to the left |
A3D_TURN_SLIGHT_RIGHT |
4 |
25 to 60 degrees to the right |
A3D_TURN_RIGHT |
5 |
60 to 120 degrees to the right |
A3D_TURN_SHARP_RIGHT |
6 |
120 to 160 degrees to the right |
A3D_TURN_BACK |
7 |
More than 160 degrees, or turning around |
- Only junctions where more than two ways meet give turns, besides turning back. A road that bends between junctions, however sharply, gives none.
- A change of less than 25 degrees is going on, and gives no turn.
- Turns less than 25 metres apart count as one, with their angles added. Crossing a divided road to turn left is one left turn, not a left turn and a right turn.
- A route that starts against the
headingof A3D_FindRoute begins withA3D_TURN_BACKat its first point.
The routes for vehicles pay for each turn as they search: two seconds to the right, five to the left and thirty to turn back. A turn to the right is cheaper because it crosses no lane of the traffic coming the other way. Going on costs nothing, and a turn of less than 30 degrees counts as going on. See Route types.
3DAndreas 0.7.1 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Routes
- Navigation mesh
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions