UNPKG

hytopia

Version:

The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.

102 lines (47 loc) 1.47 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [server](./server.md) &gt; [BaseEntityController](./server.baseentitycontroller.md) &gt; [tickWithPlayerInput](./server.baseentitycontroller.tickwithplayerinput.md) ## 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:** ```typescript tickWithPlayerInput(entity: PlayerEntity, input: PlayerInput, cameraOrientation: PlayerCameraOrientation, deltaTimeMs: number): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> entity </td><td> [PlayerEntity](./server.playerentity.md) </td><td> The entity to tick. </td></tr> <tr><td> input </td><td> [PlayerInput](./server.playerinput.md) </td><td> The current input state of the player. </td></tr> <tr><td> cameraOrientation </td><td> [PlayerCameraOrientation](./server.playercameraorientation.md) </td><td> The current camera orientation state of the player. </td></tr> <tr><td> deltaTimeMs </td><td> number </td><td> The delta time in milliseconds since the last tick. </td></tr> </tbody></table> **Returns:** void