Esempio n. 1
0
 /// <summary>
 /// Creates a free camera from a player camera.
 /// </summary>
 /// <param name="playerCamera">The player camera to use as a basis.</param>
 /// <returns></returns>
 internal static FreeCamera FromPlayerCamera( PlayerCamera playerCamera )
 {
     var fc = new FreeCamera( playerCamera.Player.EyePosition );
     fc._yaw = playerCamera.Yaw;
     fc._pitch = playerCamera.Pitch;
     return fc;
 }
Esempio n. 2
0
 /// <summary>
 /// Creates a player camera from a free camera.
 /// </summary>
 /// <param name="freeCamera">The free camera to use as a basis.</param>
 /// <param name="player">The player to attach to.</param>
 /// <returns></returns>
 internal static PlayerCamera FromFreeCamera( FreeCamera freeCamera, Player player )
 {
     var pc = new PlayerCamera( player );
     pc._yaw = freeCamera.Yaw;
     pc._pitch = freeCamera.Pitch;
     return pc;
 }