Picking units in a cone

Status
Not open for further replies.
make a line through your start point towards your angle
make another line through your unit which is perpendicular on the first line
check the distance r between the unit and the intersection point of the 2 lines
this distance r should depend on the distance d between the start point and the intersection point

one made a similar filter function to check if a unit is standing on a line through x/y and x2/y2
in the end it was a single line of code after I simplified it a little bit :)
 

Attachments

  • cone.png
    cone.png
    13.8 KB · Views: 112
Status
Not open for further replies.
Top