s&
family_starAbout
newspaperBlog
published_with_changesChanges
mapRoadmap
gamesGames
business_centerWorkshop
sprintDashboard
sprintGame Charts
delivery_truck_speedMap Charts
forumForum
docsDocs
docsDocumentation
dashboardApi Reference
inputLog in with Steam
chevron_leftChange Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية

Constructors

functionsPlayerController

Fields

crop_dinDebugFootsteps

Properties

data_objectAccelerationTime
data_objectAimStrengthBody
data_objectAimStrengthEyes
data_objectAimStrengthHead
data_objectAirFriction
data_objectAltMoveButton
data_objectBody
data_objectBodyCollider
data_objectBodyCollisionTags
data_objectBodyHeight
data_objectBodyMass
data_objectBodyRadius
data_objectBrakePower
data_objectCameraOffset
data_objectColliderObject
data_objectCurrentHeight
data_objectDeaccelerationTime
data_objectDuckedHeight
data_objectDuckedSpeed
data_objectEnableFootstepSounds
data_objectEnablePressing
data_objectEyeAngles
data_objectEyeDistanceFromTop
data_objectEyePosition
data_objectEyeTransform
data_objectFeetCollider
data_objectFootstepMixer
data_objectFootstepVolume
data_objectGroundComponent
data_objectGroundFriction
data_objectGroundIsDynamic
data_objectGroundObject
data_objectGroundSurface
data_objectGroundVelocity
data_objectHeadroom
data_objectHideBodyInFirstPerson
data_objectHovered
data_objectIsAirborne
data_objectIsClimbing
data_objectIsDucking
data_objectIsOnGround
data_objectIsSwimming
data_objectJumpSpeed
data_objectLookSensitivity
data_objectMode
data_objectPitchClamp
data_objectPressed
data_objectReachLength
data_objectRenderer
data_objectRotateWithGround
data_objectRotationAngleLimit
data_objectRotationSpeed
data_objectRunByDefault
data_objectRunSpeed
data_objectShowColliderComponents
data_objectShowCreateBodyRenderer
data_objectShowRigidbodyComponent
data_objectStepDebug
data_objectThirdPerson
data_objectTimeSinceGrounded
data_objectTimeSinceUngrounded
data_objectToggleCameraModeButton
data_objectTooltips
data_objectUseAnimatorControls
data_objectUseButton
data_objectUseCameraControls
data_objectUseFovFromPreferences
data_objectUseInputControls
data_objectUseLookControls
data_objectVelocity
data_objectWalkSpeed
data_objectWishVelocity

Methods

functionsBodyBox
functionsCreateBodyRenderer
functionsCreateRagdoll
functionsJump
functionsOnJumped
functionsPlayFootstepSound
functionsPreventGrounding
functionsStartPressing
functionsStopPressing
functionsTraceBody
functionsUpdateAnimation
functionsUpdateDucking
functionsUpdateLookAt
menu
Api
Components
PlayerController
PlayerController
Sandbox.PlayerController   account_tree Derives from Component
sealedclassAssembly: Sandbox.Engine

Inheritence

Component
PlayerController

Constructors

PlayerController

Fields

DebugFootsteps Draw debug overlay on footsteps

Properties

AccelerationTime Amount of seconds it takes to get from your current speed to your requuested speed, if higher
AimStrengthBody How strongly to turn in the eye direction with our body
AimStrengthEyes How strongly to look in the eye direction with our eyes
AimStrengthHead How strongly to turn in the eye direction with our head
AirFriction How much friction to add when we're in the air. This will slow you down unless you have a wish velocity.
AltMoveButton The button that the player will press to use to run
Body
BodyCollider
BodyCollisionTags
BodyHeight
BodyMass
BodyRadius
BrakePower We will apply extra friction when we're on the ground and our desired velocity is lower than our current velocity, so we will slow down.
CameraOffset
ColliderObject
CurrentHeight Gets the current character height from Sandbox.PlayerController.BodyHeight when standing, otherwise uses Sandbox.PlayerController.DuckedHeight when ducking.
DeaccelerationTime Amount of seconds it takes to get from your current speed to your requuested speed, if lower
DuckedHeight
DuckedSpeed
EnableFootstepSounds
EnablePressing Allows to player to interact with things by "use"ing them. Usually by pressing the "use" button.
EyeAngles The direction we're looking in input space.
EyeDistanceFromTop
EyePosition The player's eye position, in first person mode
EyeTransform The player's eye transform, in first person mode
FeetCollider
FootstepMixer
FootstepVolume
GroundComponent The collider component we're standing on. Null if we're standing nothing
GroundFriction The friction property of the ground we're standing on.
GroundIsDynamic Are we standing on a surface that is physically dynamic
GroundObject The object we're standing on. Null if we're standing on nothing.
GroundSurface If we're stnding on a surface this is it
GroundVelocity The velocity that the ground underneath us is moving
Headroom The distance from the top of the head to the closest ceiling.
HideBodyInFirstPerson
Hovered The object we're currently looking at
IsAirborne Not touching the ground, and not swimming or climbing
IsClimbing Set to true when entering a climbing Sandbox.Movement.MoveMode.
IsDucking True if this player is ducking
IsOnGround
IsSwimming Set to true when entering a swimming Sandbox.Movement.MoveMode.
JumpSpeed
LookSensitivity Allows modifying the eye angle sensitivity. Note that player preference sensitivity is already automatically applied, this is just extra.
Mode
PitchClamp
Pressed The object we're currently using by holding down USE
ReachLength How far from the eye can the player reach to use things
Renderer The body will usually be a child object with SkinnedModelRenderer
RotateWithGround
RotationAngleLimit
RotationSpeed
RunByDefault If true then the player will run by default, and holding AltMoveButton will switch to walk
RunSpeed
ShowColliderComponents
ShowCreateBodyRenderer If true we'll show the "create body" button
ShowRigidbodyComponent
StepDebug Enable debug overlays for this character
ThirdPerson
TimeSinceGrounded Amount of time since this character was last on the ground
TimeSinceUngrounded Amount of time since this character was last not on the ground
ToggleCameraModeButton
Tooltips The tooltip of the currently hovered Pressable object
UseAnimatorControls
UseButton The button that the player will press to use things
UseCameraControls
UseFovFromPreferences
UseInputControls
UseLookControls When true we'll move the camera around using the mouse
Velocity Our actual physical velocity minus our ground velocity
WalkSpeed
WishVelocity

Methods

BodyBox Return an aabb representing the body
CreateBodyRenderer
CreateRagdoll Create a ragdoll gameobject version of our render body.
Jump Adds velocity in a special way. First we subtract any opposite velocity (ie, falling) then we add the velocity, but we clamp it to that direction. This means that if you jump when you're running up a platform, you don't get extra jump power.
OnJumped
PlayFootstepSound Play a footstep sound at the given world position. Will only play if the player has a GroundSurface.
PreventGrounding Prevent being grounded for a number of seconds
StartPressing Start pressing a target component. This is called automatically when Use is pressed.
StopPressing Stop pressing. Pressed will become null.
TraceBody Trace the aabb body from one position to another and return the result
UpdateAnimation Update the animation for this renderer. This will update the body rotation etc too.
UpdateDucking Called during FixedUpdate when UseInputControls is enabled. Will duck if requested. If not, and we're ducked, will unduck if there is room
UpdateLookAt Called in Update when Using is enabled
arrow_back_ios1arrow_forward_ios
trophy 0
Apr 2026 1 post
bolo 2 days ago edited yesterday
#1
1
arrow_back_ios1arrow_forward_ios
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.
  • News
  • About
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter