Cars now fire physics raycasts at their environment and receive information about their environment.
![5d0abaaf3dbc6.png 5d0abaaf3dbc6.png](https://m.gjcdn.net/content/750/2105976-jdbctzkt-v4.webp)
The white lines from the car behind are linecasts drawn to represent the raycasts of the AI vehicles.
This will enable the AI drivers to make decisions about what to do when they encounter another vehicle.
They currently fire out 5 rays each in total all from the front of the car.
If they hit an obstacle the AI will take avoiding action but if they hit another vehicle, the AI will decide whether to overtake, collide with or avoid the vehicle in front.
This will vary from AI driver to AI driver based on the drivers skill and aggression attributes.
![5d0abab414b16.png 5d0abab414b16.png](https://m.gjcdn.net/content/750/2105977-zxeaeny4-v4.png)
Higher aggression will lead to the AI driver ramming more vehicles whilst the skill debuff affects how well the car navigates around the track and how quickly the AI driver will travel and make decisions.
That’s all for now.
Paul.
1 comment