hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
66 lines (32 loc) • 1.23 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [SimpleEntityController](./server.simpleentitycontroller.md) > [jump](./server.simpleentitycontroller.jump.md)
## SimpleEntityController.jump() method
Applies an upwards impulse to the entity to simulate a jump, only supported for entities with dynamic rigid body types.
Use for: a single jump impulse for dynamic entities. Do NOT use for: kinematic entities; this has no effect.
**Signature:**
```typescript
jump(height: number): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
height
</td><td>
number
</td><td>
The height to jump to (in blocks).
\*\*Category:\*\* Controllers
</td></tr>
</tbody></table>
**Returns:**
void
## Remarks
\*\*Deferred:\*\* The impulse is applied on the next tick, not immediately.
\*\*Dynamic only:\*\* Has no effect on kinematic entities. Uses `entity.applyImpulse()`<!-- -->.
\*\*Animations:\*\* Starts `jumpOneshotAnimations` and stops idle/move animations when the jump occurs.