tommerbob
Minecraft. :D
- Reaction score
- 110
Hello helpers. Its been a while. I'm using a simple function to detect whether a unit is behind another unit:
And it seems to work, but is there a better/more accurate way to do it?
JASS:
function Backstab takes unit attacker, unit target returns boolean
local real casterfacing = GetUnitFacing(attacker)
local real targetfacing = GetUnitFacing(target)
if facecaster > (facetarget - 50.) and facecaster < (facetarget + 50.) then
return true
endif
return false
endfunction
And it seems to work, but is there a better/more accurate way to do it?