Forging Station | Separation Based Collison Avoidance - AI Cars - Unity ECS/DOTS @ForgingStation | Uploaded October 2020 | Updated October 2024, 2 hours ago.
In this short video, I try and implement Craig Reynolds - Separation behaviour to get a more natural-looking collision avoidance between AI cars.
It is possible to have 100% collision avoidance but it might look less natural - at least in my case, of all possible values I tried for distance threshold and force multipliers, having 100% avoidance was definitely unnatural.
Creag Raynolds already has the steering behaviour figured out in his elaborate - Steering Behaviours For Autonomous Characters - paper, which emphasizes several ways to steer an agent which can be mixed to get really interesting behaviours.
Here is one of many links to the same paper/material
red3d.com/cwr/steer
I have not implemented cohesion and alignment, but, still, it exists in some manner, because cars are navigating through calculated waypoints on Navmesh - so they are aligned as all cars have a similar path as a destination is the same.
This is a very basic implementation and hence does not consider level geometry especially with sharp corners, hence it completely relies on navmesh which may not provide enough information to make precise adjustments to agent trajectory. Ray casts may have to be used in such circumstances or if possible register the level geometry in the grid and go for nonuniform grid subdivision using - say an R tree for example.
And one last thing - its Night :)
In this short video, I try and implement Craig Reynolds - Separation behaviour to get a more natural-looking collision avoidance between AI cars.
It is possible to have 100% collision avoidance but it might look less natural - at least in my case, of all possible values I tried for distance threshold and force multipliers, having 100% avoidance was definitely unnatural.
Creag Raynolds already has the steering behaviour figured out in his elaborate - Steering Behaviours For Autonomous Characters - paper, which emphasizes several ways to steer an agent which can be mixed to get really interesting behaviours.
Here is one of many links to the same paper/material
red3d.com/cwr/steer
I have not implemented cohesion and alignment, but, still, it exists in some manner, because cars are navigating through calculated waypoints on Navmesh - so they are aligned as all cars have a similar path as a destination is the same.
This is a very basic implementation and hence does not consider level geometry especially with sharp corners, hence it completely relies on navmesh which may not provide enough information to make precise adjustments to agent trajectory. Ray casts may have to be used in such circumstances or if possible register the level geometry in the grid and go for nonuniform grid subdivision using - say an R tree for example.
And one last thing - its Night :)