mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-04-19 05:48:07 -04:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
25 lines
578 B
C#
25 lines
578 B
C#
namespace Sandbox.Movement;
|
|
|
|
partial class MoveMode
|
|
{
|
|
/// <summary>
|
|
/// Get the position of the player's eye
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public virtual Transform CalculateEyeTransform()
|
|
{
|
|
var transform = new Transform();
|
|
transform.Position = Controller.WorldPosition + Vector3.Up * (Controller.BodyHeight - Controller.EyeDistanceFromTop);
|
|
transform.Rotation = Controller.EyeAngles.ToRotation();
|
|
return transform;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Called to update the camera each frame
|
|
/// </summary>
|
|
public void UpdateCamera( CameraComponent cam )
|
|
{
|
|
|
|
}
|
|
}
|