Objects spawning randomly.If object spawn closer,i need to update discance to that object.
Develop games in your browser. Powerful, performant & highly capable.
There's a pick nearest condition, use that and then the distance(obj1,obj2) expression.