hytopia 0.1.56 → 0.1.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/boilerplate/index.ts +1 -1
- package/docs/{server.basecharactercontroller.attach.md → server.baseentitycontroller.attach.md} +3 -3
- package/docs/{server.basecharactercontroller.despawn.md → server.baseentitycontroller.despawn.md} +3 -3
- package/docs/{server.basecharactercontroller.detach.md → server.baseentitycontroller.detach.md} +3 -3
- package/docs/{server.basecharactercontroller.md → server.baseentitycontroller.md} +29 -29
- package/docs/{server.basecharactercontroller.onattach.md → server.baseentitycontroller.onattach.md} +3 -3
- package/docs/server.baseentitycontroller.ondespawn.md +13 -0
- package/docs/{server.basecharactercontroller.ondetach.md → server.baseentitycontroller.ondetach.md} +3 -3
- package/docs/server.baseentitycontroller.onspawn.md +13 -0
- package/docs/server.baseentitycontroller.ontick.md +13 -0
- package/docs/{server.basecharactercontroller.ontickwithplayerinput.md → server.baseentitycontroller.ontickwithplayerinput.md} +3 -3
- package/docs/{server.basecharactercontroller.spawn.md → server.baseentitycontroller.spawn.md} +3 -3
- package/docs/{server.basecharactercontroller.tick.md → server.baseentitycontroller.tick.md} +3 -3
- package/docs/{server.basecharactercontroller.tickwithplayerinput.md → server.baseentitycontroller.tickwithplayerinput.md} +3 -3
- package/docs/server.entity.controller.md +13 -0
- package/docs/server.entity.md +40 -5
- package/docs/server.entity.modelanimationsplaybackrate.md +13 -0
- package/docs/server.entity.setcontroller.md +53 -0
- package/docs/server.entity.setmodelanimationsplaybackrate.md +57 -0
- package/docs/server.entityeventpayload.md +9 -0
- package/docs/server.entityeventpayload.setmodelanimationsplaybackrate.entity.md +11 -0
- package/docs/server.entityeventpayload.setmodelanimationsplaybackrate.md +70 -0
- package/docs/server.entityeventpayload.setmodelanimationsplaybackrate.playbackrate.md +11 -0
- package/docs/server.entityeventtype.md +14 -0
- package/docs/server.entityoptions.controller.md +13 -0
- package/docs/server.entityoptions.md +22 -3
- package/docs/server.entityoptions.modelanimationsplaybackrate.md +13 -0
- package/docs/server.facecallback.md +1 -1
- package/docs/server.facecompletecallback.md +1 -1
- package/docs/server.faceoptions.md +1 -1
- package/docs/server.md +27 -27
- package/docs/server.movecallback.md +1 -1
- package/docs/server.movecompletecallback.md +1 -1
- package/docs/server.moveoptions.md +1 -1
- package/docs/server.playerentity.md +1 -1
- package/docs/server.playerentitycontroller._constructor_.md +49 -0
- package/docs/{server.defaultcharactercontroller.attach.md → server.playerentitycontroller.attach.md} +2 -2
- package/docs/server.playerentitycontroller.canjump.md +13 -0
- package/docs/server.playerentitycontroller.canrun.md +13 -0
- package/docs/server.playerentitycontroller.canwalk.md +13 -0
- package/docs/server.playerentitycontroller.isgrounded.md +13 -0
- package/docs/server.playerentitycontroller.isonplatform.md +13 -0
- package/docs/server.playerentitycontroller.jumpvelocity.md +13 -0
- package/docs/server.playerentitycontroller.md +331 -0
- package/docs/server.playerentitycontroller.platform.md +13 -0
- package/docs/server.playerentitycontroller.runvelocity.md +13 -0
- package/docs/server.playerentitycontroller.spawn.md +53 -0
- package/docs/{server.defaultcharactercontroller.tickwithplayerinput.md → server.playerentitycontroller.tickwithplayerinput.md} +3 -3
- package/docs/server.playerentitycontroller.walkvelocity.md +13 -0
- package/docs/server.playerentitycontrolleroptions.canjump.md +13 -0
- package/docs/server.playerentitycontrolleroptions.canrun.md +13 -0
- package/docs/server.playerentitycontrolleroptions.canwalk.md +13 -0
- package/docs/server.playerentitycontrolleroptions.jumpvelocity.md +13 -0
- package/docs/{server.defaultcharactercontrolleroptions.md → server.playerentitycontrolleroptions.md} +10 -10
- package/docs/server.playerentitycontrolleroptions.runvelocity.md +13 -0
- package/docs/server.playerentitycontrolleroptions.walkvelocity.md +13 -0
- package/docs/server.playerui.lockpointer.md +53 -0
- package/docs/server.playerui.md +14 -0
- package/docs/server.playeruieventpayload.lockpointer.lock.md +11 -0
- package/docs/server.playeruieventpayload.lockpointer.md +70 -0
- package/docs/server.playeruieventpayload.lockpointer.playerui.md +11 -0
- package/docs/server.playeruieventpayload.md +9 -0
- package/docs/server.playeruieventtype.md +14 -0
- package/docs/{server.simplecharactercontroller.face.md → server.simpleentitycontroller.face.md} +2 -2
- package/docs/{server.simplecharactercontroller.md → server.simpleentitycontroller.md} +11 -13
- package/docs/{server.simplecharactercontroller.move.md → server.simpleentitycontroller.move.md} +2 -2
- package/examples/block-entity/index.ts +7 -7
- package/examples/{character-controller/MyCharacterController.ts → entity-controller/MyEntityController.ts} +20 -20
- package/examples/entity-controller/README.md +4 -0
- package/examples/{character-controller → entity-controller}/index.ts +3 -3
- package/examples/{character-controller → entity-controller}/package.json +1 -1
- package/examples/payload-game/index.ts +15 -15
- package/package.json +1 -1
- package/server.api.json +4678 -4339
- package/server.d.ts +185 -154
- package/server.js +76 -76
- package/docs/server.basecharactercontroller.ondespawn.md +0 -13
- package/docs/server.basecharactercontroller.onspawn.md +0 -13
- package/docs/server.basecharactercontroller.ontick.md +0 -13
- package/docs/server.defaultcharactercontroller._constructor_.md +0 -49
- package/docs/server.defaultcharactercontroller.canjump.md +0 -13
- package/docs/server.defaultcharactercontroller.canrun.md +0 -13
- package/docs/server.defaultcharactercontroller.canwalk.md +0 -13
- package/docs/server.defaultcharactercontroller.isgrounded.md +0 -13
- package/docs/server.defaultcharactercontroller.isonplatform.md +0 -13
- package/docs/server.defaultcharactercontroller.jumpvelocity.md +0 -13
- package/docs/server.defaultcharactercontroller.md +0 -333
- package/docs/server.defaultcharactercontroller.platform.md +0 -13
- package/docs/server.defaultcharactercontroller.runvelocity.md +0 -13
- package/docs/server.defaultcharactercontroller.spawn.md +0 -53
- package/docs/server.defaultcharactercontroller.walkvelocity.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.canjump.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.canrun.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.canwalk.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.jumpvelocity.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.runvelocity.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.walkvelocity.md +0 -13
- package/docs/server.entity.charactercontroller.md +0 -13
- package/docs/server.entity.setcharactercontroller.md +0 -53
- package/docs/server.entityoptions.charactercontroller.md +0 -13
- package/examples/character-controller/README.md +0 -4
- /package/examples/{character-controller → entity-controller}/assets/map.json +0 -0
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [BaseCharacterController](./server.basecharactercontroller.md) > [onDespawn](./server.basecharactercontroller.ondespawn.md)
|
4
|
-
|
5
|
-
## BaseCharacterController.onDespawn property
|
6
|
-
|
7
|
-
A function that is called when the controlled entity is despawned. Useful for implementing despawn logic without writing a new character controller class.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
onDespawn?: (entity: Entity) => void;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [BaseCharacterController](./server.basecharactercontroller.md) > [onSpawn](./server.basecharactercontroller.onspawn.md)
|
4
|
-
|
5
|
-
## BaseCharacterController.onSpawn property
|
6
|
-
|
7
|
-
A function that is called when the controlled entity is spawned. Useful for implementing spawn logic without writing a new character controller class.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
onSpawn?: (entity: Entity) => void;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [BaseCharacterController](./server.basecharactercontroller.md) > [onTick](./server.basecharactercontroller.ontick.md)
|
4
|
-
|
5
|
-
## BaseCharacterController.onTick property
|
6
|
-
|
7
|
-
A function that is called every tick. Useful for implementing tick logic without writing a new character controller class.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
onTick?: (entity: Entity, deltaTimeMs: number) => void;
|
13
|
-
```
|
@@ -1,49 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md) > [(constructor)](./server.defaultcharactercontroller._constructor_.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController.(constructor)
|
6
|
-
|
7
|
-
Constructs a new instance of the `DefaultCharacterController` class
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
constructor(options?: DefaultCharacterControllerOptions);
|
13
|
-
```
|
14
|
-
|
15
|
-
## Parameters
|
16
|
-
|
17
|
-
<table><thead><tr><th>
|
18
|
-
|
19
|
-
Parameter
|
20
|
-
|
21
|
-
|
22
|
-
</th><th>
|
23
|
-
|
24
|
-
Type
|
25
|
-
|
26
|
-
|
27
|
-
</th><th>
|
28
|
-
|
29
|
-
Description
|
30
|
-
|
31
|
-
|
32
|
-
</th></tr></thead>
|
33
|
-
<tbody><tr><td>
|
34
|
-
|
35
|
-
options
|
36
|
-
|
37
|
-
|
38
|
-
</td><td>
|
39
|
-
|
40
|
-
[DefaultCharacterControllerOptions](./server.defaultcharactercontrolleroptions.md)
|
41
|
-
|
42
|
-
|
43
|
-
</td><td>
|
44
|
-
|
45
|
-
_(Optional)_ Options for the controller.
|
46
|
-
|
47
|
-
|
48
|
-
</td></tr>
|
49
|
-
</tbody></table>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md) > [canJump](./server.defaultcharactercontroller.canjump.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController.canJump property
|
6
|
-
|
7
|
-
A function allowing custom logic to determine if the entity can jump.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
canJump: (defaultCharacterController: DefaultCharacterController) => boolean;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md) > [canRun](./server.defaultcharactercontroller.canrun.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController.canRun property
|
6
|
-
|
7
|
-
A function allowing custom logic to determine if the entity can run.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
canRun: (defaultCharacterController: DefaultCharacterController) => boolean;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md) > [canWalk](./server.defaultcharactercontroller.canwalk.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController.canWalk property
|
6
|
-
|
7
|
-
A function allowing custom logic to determine if the entity can walk.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
canWalk: (defaultCharacterController: DefaultCharacterController) => boolean;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md) > [isGrounded](./server.defaultcharactercontroller.isgrounded.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController.isGrounded property
|
6
|
-
|
7
|
-
Whether the entity is grounded.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
get isGrounded(): boolean;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md) > [isOnPlatform](./server.defaultcharactercontroller.isonplatform.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController.isOnPlatform property
|
6
|
-
|
7
|
-
Whether the entity is on a platform, a platform is any entity with a kinematic rigid body.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
get isOnPlatform(): boolean;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md) > [jumpVelocity](./server.defaultcharactercontroller.jumpvelocity.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController.jumpVelocity property
|
6
|
-
|
7
|
-
The upward velocity applied to the entity when it jumps.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
jumpVelocity: number;
|
13
|
-
```
|
@@ -1,333 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController class
|
6
|
-
|
7
|
-
The default character controller implementation.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
export default class DefaultCharacterController extends BaseCharacterController
|
13
|
-
```
|
14
|
-
**Extends:** [BaseCharacterController](./server.basecharactercontroller.md)
|
15
|
-
|
16
|
-
## Remarks
|
17
|
-
|
18
|
-
This class extends [BaseCharacterController](./server.basecharactercontroller.md) and implements the default movement logic for a character entity. This is used as the default for players when they join your game. This class may be extended if you'd like to implement additional logic on top of the DefaultCharacterController implementation.
|
19
|
-
|
20
|
-
## Example
|
21
|
-
|
22
|
-
|
23
|
-
```typescript
|
24
|
-
// Create a custom character controller for myEntity, prior to spawning it.
|
25
|
-
myEntity.createCustomCharacterController = () => {
|
26
|
-
return new DefaultCharacterController(myEntity, {
|
27
|
-
jumpVelocity: 10,
|
28
|
-
runVelocity: 8,
|
29
|
-
walkVelocity: 4,
|
30
|
-
});
|
31
|
-
};
|
32
|
-
|
33
|
-
// Spawn the entity in the world.
|
34
|
-
myEntity.spawn(world, { x: 53, y: 10, z: 23 });
|
35
|
-
```
|
36
|
-
|
37
|
-
## Constructors
|
38
|
-
|
39
|
-
<table><thead><tr><th>
|
40
|
-
|
41
|
-
Constructor
|
42
|
-
|
43
|
-
|
44
|
-
</th><th>
|
45
|
-
|
46
|
-
Modifiers
|
47
|
-
|
48
|
-
|
49
|
-
</th><th>
|
50
|
-
|
51
|
-
Description
|
52
|
-
|
53
|
-
|
54
|
-
</th></tr></thead>
|
55
|
-
<tbody><tr><td>
|
56
|
-
|
57
|
-
[(constructor)(options)](./server.defaultcharactercontroller._constructor_.md)
|
58
|
-
|
59
|
-
|
60
|
-
</td><td>
|
61
|
-
|
62
|
-
|
63
|
-
</td><td>
|
64
|
-
|
65
|
-
Constructs a new instance of the `DefaultCharacterController` class
|
66
|
-
|
67
|
-
|
68
|
-
</td></tr>
|
69
|
-
</tbody></table>
|
70
|
-
|
71
|
-
## Properties
|
72
|
-
|
73
|
-
<table><thead><tr><th>
|
74
|
-
|
75
|
-
Property
|
76
|
-
|
77
|
-
|
78
|
-
</th><th>
|
79
|
-
|
80
|
-
Modifiers
|
81
|
-
|
82
|
-
|
83
|
-
</th><th>
|
84
|
-
|
85
|
-
Type
|
86
|
-
|
87
|
-
|
88
|
-
</th><th>
|
89
|
-
|
90
|
-
Description
|
91
|
-
|
92
|
-
|
93
|
-
</th></tr></thead>
|
94
|
-
<tbody><tr><td>
|
95
|
-
|
96
|
-
[canJump](./server.defaultcharactercontroller.canjump.md)
|
97
|
-
|
98
|
-
|
99
|
-
</td><td>
|
100
|
-
|
101
|
-
|
102
|
-
</td><td>
|
103
|
-
|
104
|
-
(defaultCharacterController: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) => boolean
|
105
|
-
|
106
|
-
|
107
|
-
</td><td>
|
108
|
-
|
109
|
-
A function allowing custom logic to determine if the entity can jump.
|
110
|
-
|
111
|
-
|
112
|
-
</td></tr>
|
113
|
-
<tr><td>
|
114
|
-
|
115
|
-
[canRun](./server.defaultcharactercontroller.canrun.md)
|
116
|
-
|
117
|
-
|
118
|
-
</td><td>
|
119
|
-
|
120
|
-
|
121
|
-
</td><td>
|
122
|
-
|
123
|
-
(defaultCharacterController: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) => boolean
|
124
|
-
|
125
|
-
|
126
|
-
</td><td>
|
127
|
-
|
128
|
-
A function allowing custom logic to determine if the entity can run.
|
129
|
-
|
130
|
-
|
131
|
-
</td></tr>
|
132
|
-
<tr><td>
|
133
|
-
|
134
|
-
[canWalk](./server.defaultcharactercontroller.canwalk.md)
|
135
|
-
|
136
|
-
|
137
|
-
</td><td>
|
138
|
-
|
139
|
-
|
140
|
-
</td><td>
|
141
|
-
|
142
|
-
(defaultCharacterController: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) => boolean
|
143
|
-
|
144
|
-
|
145
|
-
</td><td>
|
146
|
-
|
147
|
-
A function allowing custom logic to determine if the entity can walk.
|
148
|
-
|
149
|
-
|
150
|
-
</td></tr>
|
151
|
-
<tr><td>
|
152
|
-
|
153
|
-
[isGrounded](./server.defaultcharactercontroller.isgrounded.md)
|
154
|
-
|
155
|
-
|
156
|
-
</td><td>
|
157
|
-
|
158
|
-
`readonly`
|
159
|
-
|
160
|
-
|
161
|
-
</td><td>
|
162
|
-
|
163
|
-
boolean
|
164
|
-
|
165
|
-
|
166
|
-
</td><td>
|
167
|
-
|
168
|
-
Whether the entity is grounded.
|
169
|
-
|
170
|
-
|
171
|
-
</td></tr>
|
172
|
-
<tr><td>
|
173
|
-
|
174
|
-
[isOnPlatform](./server.defaultcharactercontroller.isonplatform.md)
|
175
|
-
|
176
|
-
|
177
|
-
</td><td>
|
178
|
-
|
179
|
-
`readonly`
|
180
|
-
|
181
|
-
|
182
|
-
</td><td>
|
183
|
-
|
184
|
-
boolean
|
185
|
-
|
186
|
-
|
187
|
-
</td><td>
|
188
|
-
|
189
|
-
Whether the entity is on a platform, a platform is any entity with a kinematic rigid body.
|
190
|
-
|
191
|
-
|
192
|
-
</td></tr>
|
193
|
-
<tr><td>
|
194
|
-
|
195
|
-
[jumpVelocity](./server.defaultcharactercontroller.jumpvelocity.md)
|
196
|
-
|
197
|
-
|
198
|
-
</td><td>
|
199
|
-
|
200
|
-
|
201
|
-
</td><td>
|
202
|
-
|
203
|
-
number
|
204
|
-
|
205
|
-
|
206
|
-
</td><td>
|
207
|
-
|
208
|
-
The upward velocity applied to the entity when it jumps.
|
209
|
-
|
210
|
-
|
211
|
-
</td></tr>
|
212
|
-
<tr><td>
|
213
|
-
|
214
|
-
[platform](./server.defaultcharactercontroller.platform.md)
|
215
|
-
|
216
|
-
|
217
|
-
</td><td>
|
218
|
-
|
219
|
-
`readonly`
|
220
|
-
|
221
|
-
|
222
|
-
</td><td>
|
223
|
-
|
224
|
-
[Entity](./server.entity.md) \| undefined
|
225
|
-
|
226
|
-
|
227
|
-
</td><td>
|
228
|
-
|
229
|
-
The platform the entity is on, if any.
|
230
|
-
|
231
|
-
|
232
|
-
</td></tr>
|
233
|
-
<tr><td>
|
234
|
-
|
235
|
-
[runVelocity](./server.defaultcharactercontroller.runvelocity.md)
|
236
|
-
|
237
|
-
|
238
|
-
</td><td>
|
239
|
-
|
240
|
-
|
241
|
-
</td><td>
|
242
|
-
|
243
|
-
number
|
244
|
-
|
245
|
-
|
246
|
-
</td><td>
|
247
|
-
|
248
|
-
The normalized horizontal velocity applied to the entity when it runs.
|
249
|
-
|
250
|
-
|
251
|
-
</td></tr>
|
252
|
-
<tr><td>
|
253
|
-
|
254
|
-
[walkVelocity](./server.defaultcharactercontroller.walkvelocity.md)
|
255
|
-
|
256
|
-
|
257
|
-
</td><td>
|
258
|
-
|
259
|
-
|
260
|
-
</td><td>
|
261
|
-
|
262
|
-
number
|
263
|
-
|
264
|
-
|
265
|
-
</td><td>
|
266
|
-
|
267
|
-
The normalized horizontal velocity applied to the entity when it walks.
|
268
|
-
|
269
|
-
|
270
|
-
</td></tr>
|
271
|
-
</tbody></table>
|
272
|
-
|
273
|
-
## Methods
|
274
|
-
|
275
|
-
<table><thead><tr><th>
|
276
|
-
|
277
|
-
Method
|
278
|
-
|
279
|
-
|
280
|
-
</th><th>
|
281
|
-
|
282
|
-
Modifiers
|
283
|
-
|
284
|
-
|
285
|
-
</th><th>
|
286
|
-
|
287
|
-
Description
|
288
|
-
|
289
|
-
|
290
|
-
</th></tr></thead>
|
291
|
-
<tbody><tr><td>
|
292
|
-
|
293
|
-
[attach(entity)](./server.defaultcharactercontroller.attach.md)
|
294
|
-
|
295
|
-
|
296
|
-
</td><td>
|
297
|
-
|
298
|
-
|
299
|
-
</td><td>
|
300
|
-
|
301
|
-
Called when the controller is attached to an entity.
|
302
|
-
|
303
|
-
|
304
|
-
</td></tr>
|
305
|
-
<tr><td>
|
306
|
-
|
307
|
-
[spawn(entity)](./server.defaultcharactercontroller.spawn.md)
|
308
|
-
|
309
|
-
|
310
|
-
</td><td>
|
311
|
-
|
312
|
-
|
313
|
-
</td><td>
|
314
|
-
|
315
|
-
Called when the controlled entity is spawned. In DefaultCharacterController, this function is used to create the colliders for the entity for wall and ground detection.
|
316
|
-
|
317
|
-
|
318
|
-
</td></tr>
|
319
|
-
<tr><td>
|
320
|
-
|
321
|
-
[tickWithPlayerInput(entity, input, cameraOrientation, deltaTimeMs)](./server.defaultcharactercontroller.tickwithplayerinput.md)
|
322
|
-
|
323
|
-
|
324
|
-
</td><td>
|
325
|
-
|
326
|
-
|
327
|
-
</td><td>
|
328
|
-
|
329
|
-
Ticks the player movement for the character controller, overriding the default implementation.
|
330
|
-
|
331
|
-
|
332
|
-
</td></tr>
|
333
|
-
</tbody></table>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md) > [platform](./server.defaultcharactercontroller.platform.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController.platform property
|
6
|
-
|
7
|
-
The platform the entity is on, if any.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
get platform(): Entity | undefined;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md) > [runVelocity](./server.defaultcharactercontroller.runvelocity.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController.runVelocity property
|
6
|
-
|
7
|
-
The normalized horizontal velocity applied to the entity when it runs.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
runVelocity: number;
|
13
|
-
```
|
@@ -1,53 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md) > [spawn](./server.defaultcharactercontroller.spawn.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController.spawn() method
|
6
|
-
|
7
|
-
Called when the controlled entity is spawned. In DefaultCharacterController, this function is used to create the colliders for the entity for wall and ground detection.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
spawn(entity: Entity): void;
|
13
|
-
```
|
14
|
-
|
15
|
-
## Parameters
|
16
|
-
|
17
|
-
<table><thead><tr><th>
|
18
|
-
|
19
|
-
Parameter
|
20
|
-
|
21
|
-
|
22
|
-
</th><th>
|
23
|
-
|
24
|
-
Type
|
25
|
-
|
26
|
-
|
27
|
-
</th><th>
|
28
|
-
|
29
|
-
Description
|
30
|
-
|
31
|
-
|
32
|
-
</th></tr></thead>
|
33
|
-
<tbody><tr><td>
|
34
|
-
|
35
|
-
entity
|
36
|
-
|
37
|
-
|
38
|
-
</td><td>
|
39
|
-
|
40
|
-
[Entity](./server.entity.md)
|
41
|
-
|
42
|
-
|
43
|
-
</td><td>
|
44
|
-
|
45
|
-
The entity that is spawned.
|
46
|
-
|
47
|
-
|
48
|
-
</td></tr>
|
49
|
-
</tbody></table>
|
50
|
-
**Returns:**
|
51
|
-
|
52
|
-
void
|
53
|
-
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterController](./server.defaultcharactercontroller.md) > [walkVelocity](./server.defaultcharactercontroller.walkvelocity.md)
|
4
|
-
|
5
|
-
## DefaultCharacterController.walkVelocity property
|
6
|
-
|
7
|
-
The normalized horizontal velocity applied to the entity when it walks.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
walkVelocity: number;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterControllerOptions](./server.defaultcharactercontrolleroptions.md) > [canJump](./server.defaultcharactercontrolleroptions.canjump.md)
|
4
|
-
|
5
|
-
## DefaultCharacterControllerOptions.canJump property
|
6
|
-
|
7
|
-
A function allowing custom logic to determine if the entity can jump.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
canJump?: () => boolean;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterControllerOptions](./server.defaultcharactercontrolleroptions.md) > [canRun](./server.defaultcharactercontrolleroptions.canrun.md)
|
4
|
-
|
5
|
-
## DefaultCharacterControllerOptions.canRun property
|
6
|
-
|
7
|
-
A function allowing custom logic to determine if the entity can run.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
canRun?: () => boolean;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterControllerOptions](./server.defaultcharactercontrolleroptions.md) > [canWalk](./server.defaultcharactercontrolleroptions.canwalk.md)
|
4
|
-
|
5
|
-
## DefaultCharacterControllerOptions.canWalk property
|
6
|
-
|
7
|
-
A function allowing custom logic to determine if the entity can walk.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
canWalk?: () => boolean;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterControllerOptions](./server.defaultcharactercontrolleroptions.md) > [jumpVelocity](./server.defaultcharactercontrolleroptions.jumpvelocity.md)
|
4
|
-
|
5
|
-
## DefaultCharacterControllerOptions.jumpVelocity property
|
6
|
-
|
7
|
-
The upward velocity applied to the entity when it jumps.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
jumpVelocity?: number;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterControllerOptions](./server.defaultcharactercontrolleroptions.md) > [runVelocity](./server.defaultcharactercontrolleroptions.runvelocity.md)
|
4
|
-
|
5
|
-
## DefaultCharacterControllerOptions.runVelocity property
|
6
|
-
|
7
|
-
The normalized horizontal velocity applied to the entity when it runs.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
runVelocity?: number;
|
13
|
-
```
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [server](./server.md) > [DefaultCharacterControllerOptions](./server.defaultcharactercontrolleroptions.md) > [walkVelocity](./server.defaultcharactercontrolleroptions.walkvelocity.md)
|
4
|
-
|
5
|
-
## DefaultCharacterControllerOptions.walkVelocity property
|
6
|
-
|
7
|
-
The normalized horizontal velocity applied to the entity when it walks.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
walkVelocity?: number;
|
13
|
-
```
|