source-2-wiki

Unofficial Source 2 Wiki

View on GitHub

CBasePlayer

Methods

IsVRControllerButtonPressed

bool IsVRControllerButtonPressed(int nButton)
Returns true if the controller button is pressed.

IsVRDashboardShowing

bool IsVRDashboardShowing()
Returns true if the SteamVR dashboard is showing for this player.

GetHMDAnchor

handle GetHMDAnchor()
Returns the HMD anchor entity for this player if it exists.

IsNoclipping

bool IsNoclipping()
Returns true if the player is in noclip mode.

GetUserID

int GetUserID()
Returns the player's user id.

GetVRControllerType

<unknown> GetVRControllerType()
Returns the type of controller being used while in VR.

GetHMDAvatar

handle GetHMDAvatar()
Returns the HMD Avatar entity for this player if it exists.

AreChaperoneBoundsVisible

bool AreChaperoneBoundsVisible()
Returns whether this player's chaperone bounds are visible.

GetPlayArea

Vector GetPlayArea(int nPoint)
Returns the Vector position of the point you ask for. Pass 0-3 to get the four points.

IsUsePressed

bool IsUsePressed()
Returns true if the use key is pressed.