MoveModeclass
A move mode for this character
Constructors1
Showing 1 constructors
protected MoveMode()
No results match this filter.
Methods19
Showing 19 methods
public virtual void AddVelocity()
void—public virtual Transform CalculateEyeTransform()
Get the position of the player's eye
public virtual bool IsStandableSurace(Sandbox.SceneTraceResult& modreq(System.Runtime.InteropServices.InAttribute) result)
| Parameter | Type | Description |
|---|---|---|
| result | SceneTraceResult& modreq(InAttribute) | — |
bool—public virtual bool IsStandableSurface(Sandbox.SceneTraceResult& modreq(System.Runtime.InteropServices.InAttribute) result)
| Parameter | Type | Description |
|---|---|---|
| result | SceneTraceResult& modreq(InAttribute) | — |
bool—public virtual void OnModeBegin()
This mode has just started
void—public virtual void OnModeEnd(Sandbox.Movement.MoveMode next)
This mode has stopped. We're swapping to another move mode.
| Parameter | Type | Description |
|---|---|---|
| next | MoveMode | — |
void—protected virtual void OnRotateRenderBody(Sandbox.SkinnedModelRenderer renderer)
Updates the `Sandbox.Component.WorldRotation` of `renderer`.
| Parameter | Type | Description |
|---|---|---|
| renderer | SkinnedModelRenderer | — |
void—protected virtual void OnUpdateAnimatorLookDirection(Sandbox.SkinnedModelRenderer renderer)
Set animation parameters on `renderer` to look towards `Sandbox.Movement.MoveMode.CalculateEyeTransform`.
| Parameter | Type | Description |
|---|---|---|
| renderer | SkinnedModelRenderer | — |
void—protected virtual void OnUpdateAnimatorState(Sandbox.SkinnedModelRenderer renderer)
Sets animation parameters on `renderer` describing the movement style, like swimming, falling, or ducking.
| Parameter | Type | Description |
|---|---|---|
| renderer | SkinnedModelRenderer | — |
void—protected virtual void OnUpdateAnimatorVelocity(Sandbox.SkinnedModelRenderer renderer)
Sets animation parameters on `renderer` based on the current `Sandbox.PlayerController.Velocity` and `Sandbox.PlayerController.WishVelocity`.
| Parameter | Type | Description |
|---|---|---|
| renderer | SkinnedModelRenderer | — |
void—public virtual void PostPhysicsStep()
Called after the physics step is run
void—public virtual void PrePhysicsStep()
Called before the physics step is run
void—public virtual int Score(Sandbox.PlayerController controller)
Highest number becomes the new control mode
| Parameter | Type | Description |
|---|---|---|
| controller | PlayerController | — |
int—protected void StickToGround(float maxDistance)
If we're on the ground, make sure we stay there by falling to the ground
| Parameter | Type | Description |
|---|---|---|
| maxDistance | float | — |
void—protected void TrySteppingUp(float maxDistance)
If we're approaching a step, step up if possible
| Parameter | Type | Description |
|---|---|---|
| maxDistance | float | — |
void—public virtual void UpdateAnimator(Sandbox.SkinnedModelRenderer renderer)
Update the animator which is available at Controller.Renderer.
| Parameter | Type | Description |
|---|---|---|
| renderer | SkinnedModelRenderer | — |
void—public void UpdateCamera(Sandbox.CameraComponent cam)
Called to update the camera each frame
| Parameter | Type | Description |
|---|---|---|
| cam | CameraComponent | — |
void—No results match this filter.
Properties3
Showing 3 properties
public virtual bool Sandbox.Movement.MoveMode.AllowFalling { get; set; }
bool—public virtual bool Sandbox.Movement.MoveMode.AllowGrounding { get; set; }
bool—public Sandbox.PlayerController Sandbox.Movement.MoveMode.Controller { get; set; }
No results match this filter.