• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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