Class PlayerMovement
Namespace: ValveResourceFormat.Renderer.Input
Assembly: Renderer.dll
Source engine-style FPS player movement controller with collision detection, gravity, and crouch support.
public class PlayerMovementInheritance
Constructors
PlayerMovement(UserInput)
Initializes a new bound to the given user input source.
public PlayerMovement(UserInput input)Parameters
input UserInput
The user input instance used to read key state.
Properties
AutoBunnyHop
Gets or sets a value indicating whether bunny-hopping is allowed by holding the jump key.
public bool AutoBunnyHop { get; set; }Property Value
Initialize
Gets or sets a value indicating whether the controller should reinitialize its position from the camera on the next tick.
public bool Initialize { get; set; }Property Value
RunSpeed
Gets or sets the base run speed in world units per second.
public float RunSpeed { get; set; }Property Value
Velocity
Gets the current player velocity in world units per second.
public Vector3 Velocity { get; }Property Value
Methods
ProcessMovement(UserInput, Camera, float)
Main movement tick - processes input and updates position/velocity
public void ProcessMovement(UserInput input, Camera camera, float deltaTime)Parameters
input UserInput
camera Camera
deltaTime float
ResetPosition(Camera)
Reinitialize the character position from the current camera location. Call this when switching from noclip to FPS movement mode.
public void ResetPosition(Camera camera)Parameters
camera Camera

