Game Development Community

Pick Pick Pick...

by Scott Johnson · in Torque Game Builder · 08/19/2006 (9:23 pm) · 1 replies

I know that there are several methods of Picking objects.

Circular, Rectangular, and line based pick methods.

Can anyone suggest how I might pick like the following image demonstrates?:

www.comcoder.com/astro/GG/neighborhood.gif
I know I can get close by using a circle, but I would like to exclude objects that I can't see...

It would be useful to have a pick function that was based on an arc... this would also be able to double as a circle pick (if the angle was 360)...

Thanks.

#1
08/20/2006 (12:02 am)
First check if the pickpoint is actually inside the circle. Then take the pickpoint and the point of the object to make a vector. Calculate this vector's angle and check if it is inside the arc's interval of allowed angles et voila, you have an pick arc.