Here is the function necessary to detect whether unit 1 is facing unit 2 and whether unit 1 is behind unit 2. Naturally, it can be manipulated in various ways.
EDIT: Updated to version 0.1 - fixed an issue where sometimes the function would return false when it should return true
Here is the function necessary to detect whether unit 1 is facing unit 2 and whether unit 1 is behind unit 2. Naturally, it can be manipulated in various ways.
EDIT: Updated to version 0.1 - fixed an issue where sometimes the function would return false when it should return true
Here's a tutorial map you can use as well (just poke through triggers):
Link Removed: http://www.mediafire.com/file/21as7gp5cxgd07o/Unit Facing Detection.SC2Map
Enjoy.