Guest User

Untitled

a guest
Oct 22nd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.32 KB | None | 0 0
  1.             if (this.Target != null)
  2.             {
  3.                 Vector3 distance = (this.Target.Position.Translation - this.Position.Translation);
  4.  
  5.                 Vector2 flatdistance = new Vector2(distance.X, distance.Z);
  6.  
  7.                 Elevation = (float)Math.Atan2(-distance.Y, flatdistance.Length());
  8.                 Rotation = (float)Math.Atan2(distance.X, distance.Z);
  9.             }
Add Comment
Please, Sign In to add comment