Closed a1batross closed 2 years ago
Nah, this is not correct.
With fabs()
tank head begins to turning by few degress, like it's in panic. :)
Will update this branch with another solution
Feels a bit more stable with just doing nothing if target is too close. It's still twitching but less.
Funny, you can be teleported to the world origin if standing on a certain spot on top of Bradley on c2a5b
.
It doesn't happen with this fix.
What if just do nothing for negative value?
@nekonomicon yeah, in last version I don't change any angles.
Where? I see fabs.
@nekonomicon no, it's not... I force-pushed fabs
-less changes. But haven't verified them, and these were old changes. O_o
Well, should be OK now.
When target is too close to the tank origin,
d2 - r2
expression may become negative causing domain error on square root, and poisoning other fields and even other entities with NaNThis can be easily tested by jumping on a tank head on
c2a5b
.I'm not sure if we should take absolute value or zero in this case.