GridVids
Sign in with YouTube

Separation Based Collison Avoidance - AI Cars - Unity ECS/DOTS

Forging Station Oct 24, 2020 14:14
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Don't Miss
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Mark watched
Create an account to hide videos, mark them watched, or save them to Don't Miss.
Hide
Open in popup Open on YouTube
Share video

Share video

Copy the GridVids link or iframe code.

Video link
Iframe code
Iframe content

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 https://www.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 :)
Science & Technology
#Forging Station #Sumera Sankruthyayana #Unity Dots #Unity RCS #Steering Behaviors For Autonomous Characters #Separation #Basic #AI cars #collision avoidance #Distance Threshold #Force multiplier #Steering #Night #Headlamp #Natural movement #collision avoidance cars #collision avoidance rules #Algorithm