Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (this.Target != null)
- {
- Vector3 distance = (this.Target.Position.Translation - this.Position.Translation);
- Vector2 flatdistance = new Vector2(distance.X, distance.Z);
- Elevation = (float)Math.Atan2(-distance.Y, flatdistance.Length());
- Rotation = (float)Math.Atan2(distance.X, distance.Z);
- }
Add Comment
Please, Sign In to add comment