Cars now fire physics raycasts at their environment and receive information about their environment.

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.

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