Game Development Community

Radial Search

by Viktor Rumanuk · in Torque X 2D · 11/21/2007 (3:44 pm) · 2 replies

Hello everyone,

I am trying to create a method that will do a radial search for objects in my area, then find the object closest to me and trigger an event based on that object's name. i.e: If the object is an NPC open a conversation window etc. Not sure where to start at this point.

Thanks, Viktor

#1
11/21/2007 (4:17 pm)
It sounds like you want T2dSceneGraph.Instance.FindObjects(). You can specify a search radius around a point or a rectangle.
#2
11/22/2007 (1:01 pm)
Thanks, Joshua. This seems to be working fine.