hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
514 lines (219 loc) • 7.37 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [DefaultPlayerEntityControllerOptions](./server.defaultplayerentitycontrolleroptions.md)
## DefaultPlayerEntityControllerOptions interface
Options for creating a DefaultPlayerEntityController instance.
**Signature:**
```typescript
export interface DefaultPlayerEntityControllerOptions
```
## Properties
<table><thead><tr><th>
Property
</th><th>
Modifiers
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
[applyDirectionalMovementRotations?](./server.defaultplayerentitycontrolleroptions.applydirectionalmovementrotations.md)
</td><td>
</td><td>
boolean
</td><td>
_(Optional)_ Whether to apply directional rotations to the entity while moving, defaults to true.
</td></tr>
<tr><td>
[autoCancelMouseLeftClick?](./server.defaultplayerentitycontrolleroptions.autocancelmouseleftclick.md)
</td><td>
</td><td>
boolean
</td><td>
_(Optional)_ Whether to automatically cancel left click input after first processed tick, defaults to true.
</td></tr>
<tr><td>
[canJump?](./server.defaultplayerentitycontrolleroptions.canjump.md)
</td><td>
</td><td>
() => boolean
</td><td>
_(Optional)_ A function allowing custom logic to determine if the entity can jump.
</td></tr>
<tr><td>
[canRun?](./server.defaultplayerentitycontrolleroptions.canrun.md)
</td><td>
</td><td>
() => boolean
</td><td>
_(Optional)_ A function allowing custom logic to determine if the entity can run.
</td></tr>
<tr><td>
[canSwim?](./server.defaultplayerentitycontrolleroptions.canswim.md)
</td><td>
</td><td>
() => boolean
</td><td>
_(Optional)_ A function allowing custom logic to determine if the entity can swim.
</td></tr>
<tr><td>
[canWalk?](./server.defaultplayerentitycontrolleroptions.canwalk.md)
</td><td>
</td><td>
() => boolean
</td><td>
_(Optional)_ A function allowing custom logic to determine if the entity can walk.
</td></tr>
<tr><td>
[faceForwardOnStop?](./server.defaultplayerentitycontrolleroptions.faceforwardonstop.md)
</td><td>
</td><td>
boolean
</td><td>
_(Optional)_ Whether to face forward when the entity stops moving.
</td></tr>
<tr><td>
[idleLoopedAnimations?](./server.defaultplayerentitycontrolleroptions.idleloopedanimations.md)
</td><td>
</td><td>
string\[\]
</td><td>
_(Optional)_ Overrides the animation(s) that will play when the entity is idle.
</td></tr>
<tr><td>
[interactOneshotAnimations?](./server.defaultplayerentitycontrolleroptions.interactoneshotanimations.md)
</td><td>
</td><td>
string\[\]
</td><td>
_(Optional)_ Overrides the animation(s) that will play when the entity interacts (left click)
</td></tr>
<tr><td>
[jumpLandHeavyOneshotAnimations?](./server.defaultplayerentitycontrolleroptions.jumplandheavyoneshotanimations.md)
</td><td>
</td><td>
string\[\]
</td><td>
_(Optional)_ Overrides the animation(s) that will play when the entity lands with a high velocity.
</td></tr>
<tr><td>
[jumpLandLightOneshotAnimations?](./server.defaultplayerentitycontrolleroptions.jumplandlightoneshotanimations.md)
</td><td>
</td><td>
string\[\]
</td><td>
_(Optional)_ Overrides the animation(s) that will play when the entity lands after jumping or being airborne.
</td></tr>
<tr><td>
[jumpOneshotAnimations?](./server.defaultplayerentitycontrolleroptions.jumponeshotanimations.md)
</td><td>
</td><td>
string\[\]
</td><td>
_(Optional)_ Overrides the animation(s) that will play when the entity is jumping.
</td></tr>
<tr><td>
[jumpVelocity?](./server.defaultplayerentitycontrolleroptions.jumpvelocity.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ The upward velocity applied to the entity when it jumps.
</td></tr>
<tr><td>
[runLoopedAnimations?](./server.defaultplayerentitycontrolleroptions.runloopedanimations.md)
</td><td>
</td><td>
string\[\]
</td><td>
_(Optional)_ Overrides the animation(s) that will play when the entity is running.
</td></tr>
<tr><td>
[runVelocity?](./server.defaultplayerentitycontrolleroptions.runvelocity.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ The normalized horizontal velocity applied to the entity when it runs.
</td></tr>
<tr><td>
[sticksToPlatforms?](./server.defaultplayerentitycontrolleroptions.stickstoplatforms.md)
</td><td>
</td><td>
boolean
</td><td>
_(Optional)_ Whether the entity sticks to platforms, defaults to true.
</td></tr>
<tr><td>
[swimFastVelocity?](./server.defaultplayerentitycontrolleroptions.swimfastvelocity.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ The normalized horizontal velocity applied to the entity when it swims fast (equivalent to running).
</td></tr>
<tr><td>
[swimGravity?](./server.defaultplayerentitycontrolleroptions.swimgravity.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ The gravity modifier applied to the entity when swimming.
</td></tr>
<tr><td>
[swimIdleLoopedAnimations?](./server.defaultplayerentitycontrolleroptions.swimidleloopedanimations.md)
</td><td>
</td><td>
string\[\]
</td><td>
_(Optional)_ The looped animation(s) that will play when the entity is not moving while swimming.
</td></tr>
<tr><td>
[swimLoopedAnimations?](./server.defaultplayerentitycontrolleroptions.swimloopedanimations.md)
</td><td>
</td><td>
string\[\]
</td><td>
_(Optional)_ The looped animation(s) that will play when the entity is swimming in any direction.
</td></tr>
<tr><td>
[swimMaxGravityVelocity?](./server.defaultplayerentitycontrolleroptions.swimmaxgravityvelocity.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ The maximum downward velocity that the entity can reach when affected by gravity while swimming.
</td></tr>
<tr><td>
[swimSlowVelocity?](./server.defaultplayerentitycontrolleroptions.swimslowvelocity.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ The normalized horizontal velocity applied to the entity when it swims slowly (equivalent to walking).
</td></tr>
<tr><td>
[swimUpwardVelocity?](./server.defaultplayerentitycontrolleroptions.swimupwardvelocity.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ The upward velocity applied to the entity when swimming.
</td></tr>
<tr><td>
[walkLoopedAnimations?](./server.defaultplayerentitycontrolleroptions.walkloopedanimations.md)
</td><td>
</td><td>
string\[\]
</td><td>
_(Optional)_ Overrides the animation(s) that will play when the entity is walking.
</td></tr>
<tr><td>
[walkVelocity?](./server.defaultplayerentitycontrolleroptions.walkvelocity.md)
</td><td>
</td><td>
number
</td><td>
_(Optional)_ The normalized horizontal velocity applied to the entity when it walks.
</td></tr>
</tbody></table>