• 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.

Get wall angle (wall bouncing missile)

Status
Not open for further replies.
Level 23
Joined
Apr 8, 2017
Messages
1,604
FOR HORIZONTAL WALLS
Set angle[1] = (Facing of (Picked unit))
Set angle[2] = (360.00 - angle[1])

FOR VERTICAL WALLS

Set angle[1] = (Facing of (Picked unit))
Set angle[2] = (360.00 - angle[1])
Set angle[2] = (angle[2] - 180.00)

But how can i get the wall angle? please help
Im trying to do a wall-bounce missile, it works good but now i need to get the wall orientation :/
 
@Diegoit it turns out that you don't have to calculate wall orientation to collide with walls that only take on two angles

Instead you can simply apply collision of angle 1, then test if the result is walkable. If that test fails, then apply the collision of angle 2. This is an AND operation.
 
Status
Not open for further replies.
Top