- Joined
- Jul 27, 2008
- Messages
- 1,702
Hello. I am about 2 days breaking my head trying to think how to calculate angles to make a GUI missile to turn in correct direction (left or right).
I cant freaking figure it out. Help please.
Here is some variables that missile have and some explaining how it works:
-Missile is NOT turning to unit with facing, but with ANGLE.
-Missile have detection range, so it fly at line unit detect an enemy.
-Missile have turn speed, so it cant turn too fast.
I tryed a lot of angle calculations, but it bugs a lot when rocket come from diferent sides and angles. The logic is kinda like this.
I cant freaking figure it out. Help please.
Here is some variables that missile have and some explaining how it works:
-Missile is NOT turning to unit with facing, but with ANGLE.
-Missile have detection range, so it fly at line unit detect an enemy.
-Missile have turn speed, so it cant turn too fast.
I tryed a lot of angle calculations, but it bugs a lot when rocket come from diferent sides and angles. The logic is kinda like this.