Check the distance between entity and the other entities in the scene

Hi, I want to create JobComponentSystem to calculate the distance between each entity and the other entities, so if one entity is close enough to the other entity some functions will be run on it
something look like OnTriggerEnter and the way it works but I do not want to use TriggerEnter Event
Because physics shapes very expensive Which makes RenderMeshSystemV2 crazy :slight_smile:
how can I achieve this and what is the best way to do it ?

Math.distance and getcomponentdata().Value

1 Like

andywatts cool thank you !
how can i return entity from this, do you have any example or tutorial plz ?
Also, can I check some values in this entity after return it inside the job system, like (State Component.Value,rotation.Value …etc) if (rotation.Value = x){do something} Is this possible