Character | CraytaKit
Skip to main content

Character

Inherits from: CharacterBase

Functions

Function NameReturn TypeDescriptionTags
GetUser()UserGet the User entity which controls this CharacterNone
GetLookAtPos()VectorGet the point the player is looking at, for an action camera this is the same as User:GetCameraLookAtPos but for orbit style cameras it will be in front of the playerServer Only, Local Only
GetLookAtPosition()VectorGet the point the player is looking at, for an action camera this is the same as User:GetCameraLookAtPosition but for orbit style cameras it will be in front of the playerServer Only, Local Only
GetLookAt()Vector, VectorReturn two values, the position of the player's virtual "eye" and the position the player is looking at. For an action camera this is the same as User:GetCameraLookAt but for an orbit style camera it will be the player's head position and what is in front of the playerServer Only, Local Only
SetInputLocked(boolean inputLocked)NoneLock player controlServer Only, Local Only
GetInteraction()Entity, HitResultGet whichever Entity you would interact with if you pressed interactServer Only, Local Only
PlayVibrationEffect(VibrationEffectAsset effect)NonePlays the given vibration effect on the player's controllerNone
PlayManualVibration(number intensity, number duration, boolean affectSmallMotors, boolean affectLargeMotors)Manually vibrate the player's controllerNone

Properties

Property NameReturn TypeDescriptionTags
canRollbooleanTurn on or off ability to rollRead-Write
canJumpbooleanTurn on or off ability to jumpRead-Write
canCrouchbooleanTurn on or off ability to crouch or go proneRead-Write
displayDefaultNameTagbooleanTurn on or off the default name tagRead-Write
displayDefaultQuickChatbooleanTurn on or off the default overhead quick chatRead-Write
interactionRangenumberInteraction range (from camera in cm)Read-Write
cameraTypenumberSet the character camera type. 1 = Action, 2 = OrbitRead-Write
forcedCameraPerspectivenumberSet restrictions on the action player camera perspective. 1 = No Restrictions, 2 = 1st Person Only, 3 = 3rd Person Only. (Default is 1)Read-Write
canIronSightbooleanWill the action camera iron-sight on secondary pressRead-Write
thirdPersonFOVnumberFOV of the third person action cameraRead-Write
thirdPersonIronSightFOVnumberFOV of the third person action camera in Iron Sight modeRead-Write
firstPersonFOVnumberFOV of the third person action cameraRead-Write
firstPersonIronSightFOVnumberFOV of the third person action camera in Iron Sight modeRead-Write
ironSightLookSpeedMultipliernumberSpeed multiplier of the look controls in Iron Sight modeRead-Write
cameraDistancenumberSet the orbit camera max distance from the characterRead-Write
cameraPitchnumberSet the orbit camera's pitchRead-Write
cameraYawnumberSet the orbit camera's yawRead-Write
cameraLockbooleanLock/Unlock the orbit cameraRead-Write
cameraSecondaryActionnumberSet what the secondary action does in the orbit cameraRead-Write
cameraCollisionEnabledbooleanEnable/Disable the camera's collisionRead-Write
© 2024 CraytaKit