[JASS] How letting a unit facing target point

Status
Not open for further replies.
Level 8
Joined
Feb 15, 2009
Messages
463
I think i got a mindexplosion coz of the fact that i cant remember how letting a unit facing a target point of abilty being cast

if i do with Atan2 its just always facing east has anyone the right mathematic functoin available please =D

:ned:
 
Level 19
Joined
May 1, 2008
Messages
1,130
well i am certainly having a mindexplosion coz of that english xP
so do you want to make a unit face the targetpoint?
 
Level 8
Joined
Feb 15, 2009
Messages
463
The angle between points make it with Atan2 which doesnt work for my sheet =D
yeah i want a dummy with the orcish ship model facing the target point of my ability which doesnt work with Atan2 here( i dont know why so i asked the question =) )
 
Level 8
Joined
Feb 15, 2009
Messages
463
The problem are just these 2 lines if i move the unit later via a timer callback it moves via the right direction ,but the facing is always east

x , y , l and all other variables are declared

JASS:
set k.angle = Atan2(GetLocationY(l) - y , GetLocationX(l) - x )
set k.ball = CreateUnit( GetOwningPlayer(u) , BallId , x , y , k.angle )
 
Status
Not open for further replies.
Top