Skip to content

Latest commit

 

History

History
101 lines (47 loc) · 1.44 KB

File metadata and controls

101 lines (47 loc) · 1.44 KB

Home > server > BaseEntityController > tickWithPlayerInput

BaseEntityController.tickWithPlayerInput() method

Override this method to handle entity movements based on player input for your entity controller. This is called every tick by a PlayerEntity with a entity controller.

Signature:

tickWithPlayerInput(entity: PlayerEntity, input: PlayerInput, cameraOrientation: PlayerCameraOrientation, deltaTimeMs: number): void;

Parameters

Parameter

Type

Description

entity

PlayerEntity

The entity to tick.

input

PlayerInput

The current input state of the player.

cameraOrientation

PlayerCameraOrientation

The current camera orientation state of the player.

deltaTimeMs

number

The delta time in milliseconds since the last tick.

**Returns:**

void