I tried during a while to make the built-in function UnitGetFacing to return the angle of unit in a variable but found out that it would never return the value to an integer... So now Im wondering, I would it be possible to know the angle of the direction a unit is currently facing. I am trying to make a unit bounce off walls (no height). Is there any way?
Im not necessarly seeking for an absolute solution, something that could put me on the right path would be appreciated tough.
UnitGetFacing return a real value, in degree, from 0.0 to 360.0. (negative value for degree such as -90 will get converted to 270) Try to convert to integer if you still want to for whatever reasons
Woaw Thanks you so much, I didn`t know fixed was a variable of type "Real". I was sure it was just a keyword used in the database to say it could not be used to return anything except a specific value for a specific function or something.
That make a lots of sense
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I tried during a while to make the built-in function UnitGetFacing to return the angle of unit in a variable but found out that it would never return the value to an integer... So now Im wondering, I would it be possible to know the angle of the direction a unit is currently facing. I am trying to make a unit bounce off walls (no height). Is there any way?
Im not necessarly seeking for an absolute solution, something that could put me on the right path would be appreciated tough.
@ShaZe88: Go
UnitGetFacing return a real value, in degree, from 0.0 to 360.0. (negative value for degree such as -90 will get converted to 270) Try to convert to integer if you still want to for whatever reasons
Woaw Thanks you so much, I didn`t know fixed was a variable of type "Real". I was sure it was just a keyword used in the database to say it could not be used to return anything except a specific value for a specific function or something.
That make a lots of sense