πŸ•΄οΈPlayer

Options for Entity are passed in here as well

Name
Description
Required
Type
Default

isAI

Toggle between computer-controlled and user-controlled. Temporary!

No

Boolean

false

speedProne

Prone speed in blocks/second

No

Number

2

speedWalk

Walk speed in blocks/second

No

Number

6

speedFly

Flying speed in blocks/second

No

Number

12

speedSprint

Sprint speed multiplier (applied to walk and flying speeds)

No

Number

1.5

speedFootstep

Amount of required distance between playing the footstep sound effect, in blocks

No

Number

2.5

speedTurn

AI's turning speed in radians/sec. Temporary!

No

Number

[full circle/sec]

terminalVelocity

Maximum velocity due to gravity in blocks/second

No

Number

60

jumpVelocity

Initial velocity when jumping in blocks/second

No

Number

11

coyoteTime

Amount of leeway in seconds to disable gravity and still allow jumping after falling off a ledge. Setting this too high allows walking/sprinting across gaps

No

Number

0.14

aiAttackTime

Amount of time inbetween AI's attacks in seconds

No

Number

0.5

aiWanderTime

Amount of time in seconds to walk forward before switching direction

No

Number

5

aiApproachDistance

How close the AI needs to be to its target in order to fire the approach event

No

Number

5

healthRegen

Amount of health to regenerate per second

No

Number

10

fallDamage

No

Boolean

true

fallDamageThreshold

Minimum amount of velocity required to achieve booboo in blocks/second

No

Number

17.7

fallDamageAmount

Multiplied by velocity

No

Number

6

pvpDamage

Amount of damage dealt by this player when attacking another player

No

Number

25

pvpLength

Maximum distance at which you can slap

No

Number

3

eyeHeight

Height of camera above feet in 1st person mode; overrides camera.offset

No

Number

2.55

nameplateHeight

Height of nameplate above feet

No

Number

2.99

fovWalk

Camera FOV while walking in radians; overrides camera.fov, in radians

No

Number

CAM_FOV_DEFAULT

fovSprint

Camera FOV while sprinting in radians; overrides camera.fov, in radians

No

Number

75 degrees

fovLerp

How fast to transition/tween between walk/sprint FOV, in range [0, 1] (0 = never arrive, 1 = instant snap)

No

Number

0.3

proneOffset

Amount of height to subtract from regular height while prone

No

Number

2

radius

Radius/half width of the currently targeted player's collision bounds

No

Number

0.35

otherPlayerRadius

Radius/half width of all players' collision bounds that aren't currently targeted by the camera

No

Number

1

height

Height of player's collision bounds. Must be at least twice the radius

No

Number

2.9

contactOffset

https://gameworksdocs.nvidia.com/PhysX/4.1/documentation/physxapi/files/classPxControllerDesc.html#a811b0354ee3c9c037dca94f7cae4205e

No

Number

0.01

slopeLimit

https://gameworksdocs.nvidia.com/PhysX/4.1/documentation/physxapi/files/classPxControllerDesc.html#aadb1325a040c61b6cd29cfa94d24c180 (in radians, not cosine!)

No

Number

60 degrees

canBuild

No

Boolean

true

canInteract

Whether or not player can use the interact key binding on a block

No

Boolean

true

canSprint

No

Boolean

true

canFly

No

Boolean

true

canProne

No

Boolean

true

canJump

No

Boolean

true

canMove

Whether or not to allow constant velocity movement (forward, backward, etc.)

No

Boolean

true

canPickUpItem

No

Boolean

true

hasLight

No

Boolean

true

hasProneBarriers

Prone barriers prevent the player from falling down from the edge of a cube block while prone

No

Boolean

true

proneBarrierSize

How much the player can hang over the edge. Needs to be less than the radius for more reliability

No

Number

0.15

light

defLight options

No

Object

{ type: "spot", power: 5 }

itemIndex

Index of the mount point that holds the item currently in use

No

Integer

0

inventoryActiveSlots

Number of inventory slots that player can easily switch between

No

Number

5

inventoryStorageSlots

Number of inventory slots that players can store items in but not easily switch between,

No

Number

30

action

Dictionary of animation names taken from the mesh

No

Object

sound

Dictionary of defSound objects for different events

No

Object

Last updated