• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Get wall angle (wall bouncing missile)

Status
Not open for further replies.
Level 21
Joined
Apr 8, 2017
Messages
1,536
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