-
Notifications
You must be signed in to change notification settings - Fork 1
Player bindings
SDraw edited this page Aug 15, 2023
·
6 revisions
-
localPlayer
: local player; get, Player -
remotePlayers
: all remote players; get, table -
allPlayers
: local and remote players; get, table
-
isLocal
: local check; get, boolean -
isRemote
: remote check, boolean -
isConnected
: remote player validity, boolean -
name
: player name; get, string -
uuid
: player's UUID; get, string -
position
player position; get, Vector3 -
rotation
: player rotation; get, Quaternion -
avatarHeight
: current avatar height; get, float -
avatarScale
: current avatar scale; get, float -
playerHeight
: current player height according to settings; get, float; for remote playersavatarHeight
is returned -
playerScale
: current player scale according to settings; get, float; for remote playersavatarScale
is returned -
viewPosition
: current camera view position; get, Vector3 -
viewRotation
: current camera view rotation; get, Quaternion -
inVR
: VR state; get, boolean -
inFBT
: FBT presense state; get, boolean; alwaysfalse
for remote players -
hasAvatar
: current avatar presence; get, boolean -
isAvatarLoading
: avatar loading state; get, boolean; alwaysfalse
for remote players -
isAvatarHumanoid
: humanoid avatar check; get, boolean -
isFlying
: flying state; get, boolean -
isCrouching
: crouching state; get, boolean -
isProning
: proning state; get, boolean -
isSitting
: sitting state; get, boolean -
isSprinting
: sprinting state; get, boolean -
isJumping
: jumping state; get, boolean; alwaysfalse
for remote players -
isGrounded
: ground state; get, boolean -
leftHandPosition
: left hand VR controller position; get, Vector3 -
leftHandRotation
: left hand VR controller rotation; get, Quaternion -
rightHandPosition
: right hand VR controller position; get, Vector3 -
rightHandRotation
: right hand VR controller rotation; get, Quaternion -
leftHandGesture
: left hand gesture; get, float -
rightHandGesture
: right hand gesture; get, float -
zoom
: zoom state (middle mouse button); get, bool; alwaysfalse
for remote players -
zoomFactor
: zoom factor; get, float; always 0.0 for remote players -
movementVector
: movement direction of player; get, Vector2 -
lookVector
: camera look change based on input; get, Vector2; alwaysVector2.zero
for remote players -
individualFingerTracking
: fingers tracking state; get, boolean -
fingerCurls
: current finger curls; get, table with 10 float values -
fingerSpreads
: current finger spreads; get, table with 10 float values
-
bool Teleport(Vector3 pos, Quaternion rot = Quaternion.identity)
: teleports player to specific point, only for local player -
bool SetImmobilized(bool immobilize)
: immobilizes player movement whenimmobilize
is set totrue
, only for local player -
bool Respawn()
: respawns player, only for local player -
Vector3 GetBonePosition(string humanBone)
: returns position of avatar bone, orVector3.zero
if avatar is generic, not loaded or doesn't have specific bone. -
Quaternion GetBoneRotation(string humanBone)
: returns rotation of avatar bone, orQuaternion.identity
if avatar is generic, not loaded or doesn't have specific bone.
-
Player Find(string uuid)
: searches player by UUID -
Player Find(GameObject object)
: searches player by providedGameObject
-
bool IsPlayer(object obj)
: checks if object is type ofPlayer