Recently I used GetFacing() to calculate the time needed to turn to specific vector point. previously i posted that we dont have access to hero's turn rate and recieve to responce. however by implementing turn rates for each hero, this problem is resolved. but here i encounter with negative values of GetFacing() function. as u can see in images, the longer white line represent the direction hero is facing and thats may not be correct( last frame = 109 degree ). however in console, GetFacing() returns negative values and I was wondering why this happen. by slowing the game( host_timescale ) i realized that when mirana turns to right( mean right of itself ) GetFacing() return negative values( -21, -37 and ... ). at the other side function return positive and normalized values( [0 360] ) when hero turn to left.
this is somehow confusing but the negative value( and also many times non-normalized ) represent that is GetBot() hero turning left or not and this would be tricky for calculating location-based abilities like meat hook and Fissure.
briefly, two issues here arise from GetFacing():
1- somtimes values are non-normalized
2- values are negative if hero turn to right
wiating for your comments and suggestions.
this code is used for this post:
NOTE: ignore angleDiff
local facing = GetBot():GetFacing();
local angleDiff = UTILITY.GetAngleBetweenPoints( creep:GetLocation() ,GetBot():GetLocation() );
print( "i: "..i.."angleDiff: "..angleDiff.." facing: "..facing );