WayTooShort
New Member
- Reaction score
- 4
How can I make unit bounce from a wall to the right direction? I basically got this dummy unit which is moved by periodical triggers towards a target location, but if it meets a wall in the way (unpathable terrain) I want it to bounce back from it.
What I tried was checking the angle between start location of the unit and the position of the unpathable terrain. Look at the picture:
(http://yfrog.com/71prochartj if the thumbnail doesn't work)
The angle between those two points is same in both examples (a and b), but the unit should bounce to different direction. What should I do?
What I tried was checking the angle between start location of the unit and the position of the unpathable terrain. Look at the picture:
(http://yfrog.com/71prochartj if the thumbnail doesn't work)
The angle between those two points is same in both examples (a and b), but the unit should bounce to different direction. What should I do?