MeleeGetProjectedLoc

Parameters
src location
targ location
distance real
deltaAngle real
comment
note

It returns a new location, does not remove or alter location passed as src or targ. It means you must call RemoveLocation yourself after calling this function.

patch

1.00

return type
location
Source code
function MeleeGetProjectedLoc takes location src, location targ, real distance, real deltaAngle returns location
    local real srcX = GetLocationX(src)
    local real srcY = GetLocationY(src)
    local real direction = Atan2(GetLocationY(targ) - srcY, GetLocationX(targ) - srcX) + deltaAngle
    return Location(srcX + distance * Cos(direction), srcY + distance * Sin(direction))
endfunction
Source
Blizzard.j
wc3modding.com
MeleeGetProjectedLoc