Detect anothers GO before collision

Hey Guys

Is there some method to detect others objects? (without use collisionObjects)

Anything like go.get_objectInRange(int Radius):tableOfobjectsFound?

That would be a pretty simple function to make on your own. Place all your objects that you might want to detect in a Lua table. Then when you want to perform the check, iterate over that table, calculate the distance from the provided point to each object in the table and compare that value with the radius parameter. If less - add to the resulting table.

3 Likes