s&box docs
API ReferenceSandbox.Movement

public abstract class Sandbox.Movement.MoveMode : Sandbox.Component

A move mode for this character

Constructors

Showing 1 constructors

Methods

Showing 19 methods

public virtual void AddVelocity()

public virtual Transform CalculateEyeTransform()

Get the position of the player's eye

Implementations

public virtual bool IsStandableSurace(Sandbox.SceneTraceResult& modreq(System.Runtime.InteropServices.InAttribute) result)

public virtual bool IsStandableSurface(Sandbox.SceneTraceResult& modreq(System.Runtime.InteropServices.InAttribute) result)

public virtual void OnModeBegin()

This mode has just started

Implementations

public virtual void OnModeEnd(Sandbox.Movement.MoveMode next)

This mode has stopped. We're swapping to another move mode.

Implementations

protected virtual void OnRotateRenderBody(Sandbox.SkinnedModelRenderer renderer)

Updates the `Sandbox.Component.WorldRotation` of `renderer`.

protected virtual void OnUpdateAnimatorLookDirection(Sandbox.SkinnedModelRenderer renderer)

Set animation parameters on `renderer` to look towards `Sandbox.Movement.MoveMode.CalculateEyeTransform`.

protected virtual void OnUpdateAnimatorState(Sandbox.SkinnedModelRenderer renderer)

Sets animation parameters on `renderer` describing the movement style, like swimming, falling, or ducking.

Implementations

protected virtual void OnUpdateAnimatorVelocity(Sandbox.SkinnedModelRenderer renderer)

Sets animation parameters on `renderer` based on the current `Sandbox.PlayerController.Velocity` and `Sandbox.PlayerController.WishVelocity`.

public virtual void PostPhysicsStep()

Called after the physics step is run

public virtual void PrePhysicsStep()

Called before the physics step is run

public virtual int Score(Sandbox.PlayerController controller)

Highest number becomes the new control mode

Implementations

protected void StickToGround(float maxDistance)

If we're on the ground, make sure we stay there by falling to the ground

protected void TrySteppingUp(float maxDistance)

If we're approaching a step, step up if possible

public virtual void UpdateAnimator(Sandbox.SkinnedModelRenderer renderer)

Update the animator which is available at Controller.Renderer.

public void UpdateCamera(Sandbox.CameraComponent cam)

Called to update the camera each frame

public virtual Vector3 UpdateMove(Rotation eyes, Vector3 input)

Read inputs, return WishVelocity

Implementations

public virtual void UpdateRigidBody(Sandbox.Rigidbody body)

Implementations

Properties

Showing 3 properties

public virtual bool Sandbox.Movement.MoveMode.AllowFalling { get; set; }

public virtual bool Sandbox.Movement.MoveMode.AllowGrounding { get; set; }

Metadata

FieldValue
NamespaceSandbox.Movement
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Movement.MoveMode

On this page

Constructorsprotected MoveMode()Methodspublic virtual System.Void AddVelocity()public virtual Transform CalculateEyeTransform()public virtual System.Boolean IsStandableSurace(Sandbox.SceneTraceResult& modreq(System.Runtime.InteropServices.InAttribute) result)public virtual System.Boolean IsStandableSurface(Sandbox.SceneTraceResult& modreq(System.Runtime.InteropServices.InAttribute) result)public virtual System.Void OnModeBegin()public virtual System.Void OnModeEnd(Sandbox.Movement.MoveMode next)protected virtual System.Void OnRotateRenderBody(Sandbox.SkinnedModelRenderer renderer)protected virtual System.Void OnUpdateAnimatorLookDirection(Sandbox.SkinnedModelRenderer renderer)protected virtual System.Void OnUpdateAnimatorState(Sandbox.SkinnedModelRenderer renderer)protected virtual System.Void OnUpdateAnimatorVelocity(Sandbox.SkinnedModelRenderer renderer)public virtual System.Void PostPhysicsStep()public virtual System.Void PrePhysicsStep()public virtual System.Int32 Score(Sandbox.PlayerController controller)protected System.Void StickToGround(System.Single maxDistance)protected System.Void TrySteppingUp(System.Single maxDistance)public virtual System.Void UpdateAnimator(Sandbox.SkinnedModelRenderer renderer)public System.Void UpdateCamera(Sandbox.CameraComponent cam)public virtual Vector3 UpdateMove(Rotation eyes, Vector3 input)public virtual System.Void UpdateRigidBody(Sandbox.Rigidbody body)Propertiespublic virtual System.Boolean Sandbox.Movement.MoveMode.AllowFalling { get; set; }public virtual System.Boolean Sandbox.Movement.MoveMode.AllowGrounding { get; set; }public Sandbox.PlayerController Sandbox.Movement.MoveMode.Controller { get; set; }Metadata