Interface IPlayerController ​
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
The player's physical state as the entity world needs it: position, velocity, size, and moving them.
public interface IPlayerControllerRemarks ​
The player moves per rendered frame rather than per entity tick, so PlayerEntity reads this instead of owning the state. Declared here so the entity world does not depend on what drives it.
Properties ​
EyePosition ​
Gets where the view sits, which is what entity logic traces from.
Vector3 EyePosition { get; }Property Value ​
GroundEntity ​
Gets the entity the player stands on, or null in the air.
BaseEntity? GroundEntity { get; }Property Value ​
HullCenter ​
Gets the center of the collision hull, which pushers move the player from. The view can trail it for a tick after a push.
Vector3 HullCenter { get; }Property Value ​
HullHalfExtents ​
Gets the half-extents of the player's collision hull, which shrink when ducking.
Vector3 HullHalfExtents { get; }Property Value ​
IsActive ​
Gets whether the player is simulated, as opposed to a free camera.
bool IsActive { get; }Property Value ​
bool
Position ​
Gets the position of the player's feet, which is the entity origin.
Vector3 Position { get; }Property Value ​
Velocity ​
Gets the current velocity in units per second.
Vector3 Velocity { get; }Property Value ​
ViewForward ​
Gets the direction the player is looking.
Vector3 ViewForward { get; }Property Value ​
Methods ​
ConsumeButtons() ​
Takes the buttons seen since the last call, reported against the state the previous call left. Called once per tick by the player entity.
PlayerButtonState ConsumeButtons()Returns ​
What is held, and what changed, for the tick collecting it.
IsHullStuck(Vector3) ​
Gets whether the collision hull centered at a point overlaps the world or any collidable entity.
bool IsHullStuck(Vector3 center)Parameters ​
center Vector3
Returns ​
bool
Push(Vector3) ​
Moves the player by a pusher's displacement, already checked for obstruction. The hull moves at once; the view follows over the tick interval, as the pusher is drawn moving.
void Push(Vector3 delta)Parameters ​
delta Vector3
Teleport(Vector3, Vector3?) ​
Moves the player outright, keeping their velocity. Null angles keep the current ones.
void Teleport(Vector3 feetPosition, Vector3? angles)Parameters ​
feetPosition Vector3
angles Vector3?
TraceHull(Vector3, Vector3) ​
Sweeps the collision hull between two centers against the world and all collidable entities.
Rubikon.TraceResult TraceHull(Vector3 startCenter, Vector3 endCenter)Parameters ​
startCenter Vector3
endCenter Vector3

