Sense the Surrounding environment - Parallel Job - Collider Distance Query Unity DOTS Physics
Hi there!! Today we are going to try to use DOTS physics-based collider distance query to sense the surrounding environment for BOIDS.
The idea here is to have a mesh - a sphere collider cast near/around every boid and have this collider register a hit when it hits other entities, so we can read the hit position and do whatever we want with it.
I have not spoken about filters that can be set while creating colliders, and it is still working because it is the same collider that we are referring everywhere. Naturally, it cannot register a hit with itself, and can only interact with other entities.
Currently, the collider hits all other entities/colliders but we can control that with the help of layers - by specifying bit masks while specifying filters.
Spatial Queries And Filtering -
https://docs.unity3d.com/Packages/[email protected]/manual/collision_queries.html
GitHub -
https://github.com/ForgingStation/DOTS-Physics---Collider-Distance-Query---Parallel-Job
Gaming
#Forging Station
#Sumera Sankruthyayana
#DOTS Physics
#Unity DOTS
#Unity ECS
#Sphere Collider
#Collider cast
#Proximity check
#Parallel Job
#DOTS Physics - Collider Distance Query - Parallel Job
#Collider Distance Query
#Flocking
#Boids
#Sense environmet
#Collider filter
#Bitmasks
#Spatial Queries And Filtering
#Collider cast input