hytopia 0.1.29 → 0.1.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. package/bin/scripts.js +1 -0
  2. package/docs/server.blocktype.md +2 -2
  3. package/docs/server.blocktype.onentitycollision.md +1 -1
  4. package/docs/server.blocktype.onentitycontactforce.md +1 -1
  5. package/docs/server.defaultcharactercontroller.canjump.md +1 -1
  6. package/docs/server.defaultcharactercontroller.canrun.md +1 -1
  7. package/docs/server.defaultcharactercontroller.canwalk.md +1 -1
  8. package/docs/server.defaultcharactercontroller.md +3 -3
  9. package/docs/server.entity.createcustomcharactercontroller.md +2 -2
  10. package/docs/server.entity.md +9 -9
  11. package/docs/server.entity.onblockcollision.md +1 -1
  12. package/docs/server.entity.onblockcontactforce.md +1 -1
  13. package/docs/server.entity.ondespawn.md +1 -1
  14. package/docs/server.entity.onentitycollision.md +1 -1
  15. package/docs/server.entity.onentitycontactforce.md +1 -1
  16. package/docs/server.entity.onspawn.md +1 -1
  17. package/docs/server.entity.ontick.md +1 -1
  18. package/docs/server.entityoptions.createcustomcharactercontroller.md +13 -0
  19. package/docs/server.entityoptions.md +19 -0
  20. package/docs/server.hytopia.blocktype.md +2 -2
  21. package/docs/server.hytopia.blocktype.onentitycollision.md +1 -1
  22. package/docs/server.hytopia.blocktype.onentitycontactforce.md +1 -1
  23. package/docs/server.hytopia.defaultcharactercontroller.canjump.md +1 -1
  24. package/docs/server.hytopia.defaultcharactercontroller.canrun.md +1 -1
  25. package/docs/server.hytopia.defaultcharactercontroller.canwalk.md +1 -1
  26. package/docs/server.hytopia.defaultcharactercontroller.md +3 -3
  27. package/docs/server.hytopia.entity.createcustomcharactercontroller.md +2 -2
  28. package/docs/server.hytopia.entity.md +9 -9
  29. package/docs/server.hytopia.entity.onblockcollision.md +1 -1
  30. package/docs/server.hytopia.entity.onblockcontactforce.md +1 -1
  31. package/docs/server.hytopia.entity.ondespawn.md +1 -1
  32. package/docs/server.hytopia.entity.onentitycollision.md +1 -1
  33. package/docs/server.hytopia.entity.onentitycontactforce.md +1 -1
  34. package/docs/server.hytopia.entity.onspawn.md +1 -1
  35. package/docs/server.hytopia.entity.ontick.md +1 -1
  36. package/docs/server.hytopia.entityoptions.createcustomcharactercontroller.md +13 -0
  37. package/docs/server.hytopia.entityoptions.md +19 -0
  38. package/docs/server.hytopia.moveoptions.md +5 -0
  39. package/docs/server.hytopia.simplecharactercontroller.md +1 -1
  40. package/docs/server.moveoptions.md +5 -0
  41. package/docs/server.simplecharactercontroller.md +1 -1
  42. package/examples/entity-spawn/index.ts +1 -1
  43. package/examples/payload-game/index.ts +46 -104
  44. package/package.json +1 -1
  45. package/server.api.json +142 -60
  46. package/server.d.ts +51 -33
  47. package/server.js +25 -25
  48. package/tsconfig.json +4 -1
  49. package/examples/character-controller/tsconfig.json +0 -27
  50. package/examples/entity-spawn/tsconfig.json +0 -27
  51. package/examples/payload-game/tsconfig.json +0 -27
package/bin/scripts.js CHANGED
@@ -51,6 +51,7 @@ const path = require('path');
51
51
  // Done, lfg!
52
52
  console.log('🚀 Hytopia project initialized successfully!');
53
53
  console.log('💡 Start your development server with `bun --watch index.ts`!');
54
+ console.log('🎮 After you start your development server, play by opening your browser and visiting: https://play.hytopia.com/?join=localhost:8080')
54
55
  return;
55
56
  }
56
57
 
@@ -183,7 +183,7 @@ The name of the block type.
183
183
 
184
184
  </td><td>
185
185
 
186
- (this: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, started: boolean) =&gt; void
186
+ (blockType: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, started: boolean) =&gt; void
187
187
 
188
188
 
189
189
  </td><td>
@@ -202,7 +202,7 @@ _(Optional)_ A callback function that is invoked when an entity collides with bl
202
202
 
203
203
  </td><td>
204
204
 
205
- (this: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
205
+ (blockType: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
206
206
 
207
207
 
208
208
  </td><td>
@@ -9,5 +9,5 @@ A callback function that is invoked when an entity collides with blocks of this
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onEntityCollision?: (this: BlockType, entity: Entity, started: boolean) => void;
12
+ onEntityCollision?: (blockType: BlockType, entity: Entity, started: boolean) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A callback function that is invoked when an entity contacts a block of this type
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onEntityContactForce?: (this: BlockType, entity: Entity, contactForceData: ContactForceData) => void;
12
+ onEntityContactForce?: (blockType: BlockType, entity: Entity, contactForceData: ContactForceData) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function allowing custom logic to determine if the entity can jump.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- canJump: (this: DefaultCharacterController) => boolean;
12
+ canJump: (defaultCharacterController: DefaultCharacterController) => boolean;
13
13
  ```
@@ -9,5 +9,5 @@ A function allowing custom logic to determine if the entity can run.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- canRun: (this: DefaultCharacterController) => boolean;
12
+ canRun: (defaultCharacterController: DefaultCharacterController) => boolean;
13
13
  ```
@@ -9,5 +9,5 @@ A function allowing custom logic to determine if the entity can walk.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- canWalk: (this: DefaultCharacterController) => boolean;
12
+ canWalk: (defaultCharacterController: DefaultCharacterController) => boolean;
13
13
  ```
@@ -101,7 +101,7 @@ Description
101
101
 
102
102
  </td><td>
103
103
 
104
- (this: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
104
+ (defaultCharacterController: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
105
105
 
106
106
 
107
107
  </td><td>
@@ -120,7 +120,7 @@ A function allowing custom logic to determine if the entity can jump.
120
120
 
121
121
  </td><td>
122
122
 
123
- (this: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
123
+ (defaultCharacterController: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
124
124
 
125
125
 
126
126
  </td><td>
@@ -139,7 +139,7 @@ A function allowing custom logic to determine if the entity can run.
139
139
 
140
140
  </td><td>
141
141
 
142
- (this: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
142
+ (defaultCharacterController: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
143
143
 
144
144
 
145
145
  </td><td>
@@ -4,10 +4,10 @@
4
4
 
5
5
  ## Entity.createCustomCharacterController property
6
6
 
7
- A function that creates a custom character controller for the entity.
7
+ A function that creates a custom character controller for the entity when it spawns.
8
8
 
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- createCustomCharacterController?: (this: Entity) => BaseCharacterController;
12
+ createCustomCharacterController?: (entity: Entity) => BaseCharacterController;
13
13
  ```
@@ -133,12 +133,12 @@ The character controller for the entity.
133
133
 
134
134
  </td><td>
135
135
 
136
- (this: [Entity](./server.entity.md)<!-- -->) =&gt; [BaseCharacterController](./server.basecharactercontroller.md)
136
+ (entity: [Entity](./server.entity.md)<!-- -->) =&gt; [BaseCharacterController](./server.basecharactercontroller.md)
137
137
 
138
138
 
139
139
  </td><td>
140
140
 
141
- _(Optional)_ A function that creates a custom character controller for the entity.
141
+ _(Optional)_ A function that creates a custom character controller for the entity when it spawns.
142
142
 
143
143
 
144
144
  </td></tr>
@@ -278,7 +278,7 @@ The name of the entity.
278
278
 
279
279
  </td><td>
280
280
 
281
- (this: [Entity](./server.entity.md)<!-- -->, block: [BlockType](./server.blocktype.md)<!-- -->, started: boolean) =&gt; void
281
+ (entity: [Entity](./server.entity.md)<!-- -->, block: [BlockType](./server.blocktype.md)<!-- -->, started: boolean) =&gt; void
282
282
 
283
283
 
284
284
  </td><td>
@@ -297,7 +297,7 @@ _(Optional)_ A function that is called when the entity collides with a block.
297
297
 
298
298
  </td><td>
299
299
 
300
- (this: [Entity](./server.entity.md)<!-- -->, block: [BlockType](./server.blocktype.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
300
+ (entity: [Entity](./server.entity.md)<!-- -->, block: [BlockType](./server.blocktype.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
301
301
 
302
302
 
303
303
  </td><td>
@@ -316,7 +316,7 @@ _(Optional)_ A function that is called when the entity collides with a block.
316
316
 
317
317
  </td><td>
318
318
 
319
- (this: [Entity](./server.entity.md)<!-- -->) =&gt; void
319
+ (entity: [Entity](./server.entity.md)<!-- -->) =&gt; void
320
320
 
321
321
 
322
322
  </td><td>
@@ -335,7 +335,7 @@ _(Optional)_ A function that is called when the entity is despawned.
335
335
 
336
336
  </td><td>
337
337
 
338
- (this: [Entity](./server.entity.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, started: boolean) =&gt; void
338
+ (entity: [Entity](./server.entity.md)<!-- -->, otherEntity: [Entity](./server.entity.md)<!-- -->, started: boolean) =&gt; void
339
339
 
340
340
 
341
341
  </td><td>
@@ -354,7 +354,7 @@ _(Optional)_ A function that is called when the entity collides with another ent
354
354
 
355
355
  </td><td>
356
356
 
357
- (this: [Entity](./server.entity.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
357
+ (entity: [Entity](./server.entity.md)<!-- -->, otherEntity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
358
358
 
359
359
 
360
360
  </td><td>
@@ -373,7 +373,7 @@ _(Optional)_ A function that is called when the entity contacts another entity.
373
373
 
374
374
  </td><td>
375
375
 
376
- (this: [Entity](./server.entity.md)<!-- -->) =&gt; void
376
+ (entity: [Entity](./server.entity.md)<!-- -->) =&gt; void
377
377
 
378
378
 
379
379
  </td><td>
@@ -392,7 +392,7 @@ _(Optional)_ A function that is called when the entity is spawned.
392
392
 
393
393
  </td><td>
394
394
 
395
- (this: [Entity](./server.entity.md)<!-- -->, tickDeltaMs: number) =&gt; void
395
+ (entity: [Entity](./server.entity.md)<!-- -->, tickDeltaMs: number) =&gt; void
396
396
 
397
397
 
398
398
  </td><td>
@@ -9,5 +9,5 @@ A function that is called when the entity collides with a block.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onBlockCollision?: (this: Entity, block: BlockType, started: boolean) => void;
12
+ onBlockCollision?: (entity: Entity, block: BlockType, started: boolean) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called when the entity collides with a block.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onBlockContactForce?: (this: Entity, block: BlockType, contactForceData: ContactForceData) => void;
12
+ onBlockContactForce?: (entity: Entity, block: BlockType, contactForceData: ContactForceData) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called when the entity is despawned.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onDespawn?: (this: Entity) => void;
12
+ onDespawn?: (entity: Entity) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called when the entity collides with another entity.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onEntityCollision?: (this: Entity, entity: Entity, started: boolean) => void;
12
+ onEntityCollision?: (entity: Entity, otherEntity: Entity, started: boolean) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called when the entity contacts another entity.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onEntityContactForce?: (this: Entity, entity: Entity, contactForceData: ContactForceData) => void;
12
+ onEntityContactForce?: (entity: Entity, otherEntity: Entity, contactForceData: ContactForceData) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called when the entity is spawned.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onSpawn?: (this: Entity) => void;
12
+ onSpawn?: (entity: Entity) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called every tick.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onTick?: (this: Entity, tickDeltaMs: number) => void;
12
+ onTick?: (entity: Entity, tickDeltaMs: number) => void;
13
13
  ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [EntityOptions](./server.entityoptions.md) &gt; [createCustomCharacterController](./server.entityoptions.createcustomcharactercontroller.md)
4
+
5
+ ## EntityOptions.createCustomCharacterController property
6
+
7
+ A function that creates a custom character controller for the entity when it spawns.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ createCustomCharacterController?: (entity: Entity) => BaseCharacterController;
13
+ ```
@@ -37,6 +37,25 @@ Description
37
37
  </th></tr></thead>
38
38
  <tbody><tr><td>
39
39
 
40
+ [createCustomCharacterController?](./server.entityoptions.createcustomcharactercontroller.md)
41
+
42
+
43
+ </td><td>
44
+
45
+
46
+ </td><td>
47
+
48
+ (entity: [Entity](./server.entity.md)<!-- -->) =&gt; [BaseCharacterController](./server.basecharactercontroller.md)
49
+
50
+
51
+ </td><td>
52
+
53
+ _(Optional)_ A function that creates a custom character controller for the entity when it spawns.
54
+
55
+
56
+ </td></tr>
57
+ <tr><td>
58
+
40
59
  [modelLoopedAnimations?](./server.entityoptions.modelloopedanimations.md)
41
60
 
42
61
 
@@ -183,7 +183,7 @@ The name of the block type.
183
183
 
184
184
  </td><td>
185
185
 
186
- (this: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, started: boolean) =&gt; void
186
+ (blockType: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, started: boolean) =&gt; void
187
187
 
188
188
 
189
189
  </td><td>
@@ -202,7 +202,7 @@ _(Optional)_ A callback function that is invoked when an entity collides with bl
202
202
 
203
203
  </td><td>
204
204
 
205
- (this: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
205
+ (blockType: [BlockType](./server.blocktype.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
206
206
 
207
207
 
208
208
  </td><td>
@@ -9,5 +9,5 @@ A callback function that is invoked when an entity collides with blocks of this
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onEntityCollision?: (this: BlockType, entity: Entity, started: boolean) => void;
12
+ onEntityCollision?: (blockType: BlockType, entity: Entity, started: boolean) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A callback function that is invoked when an entity contacts a block of this type
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onEntityContactForce?: (this: BlockType, entity: Entity, contactForceData: ContactForceData) => void;
12
+ onEntityContactForce?: (blockType: BlockType, entity: Entity, contactForceData: ContactForceData) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function allowing custom logic to determine if the entity can jump.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- canJump: (this: DefaultCharacterController) => boolean;
12
+ canJump: (defaultCharacterController: DefaultCharacterController) => boolean;
13
13
  ```
@@ -9,5 +9,5 @@ A function allowing custom logic to determine if the entity can run.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- canRun: (this: DefaultCharacterController) => boolean;
12
+ canRun: (defaultCharacterController: DefaultCharacterController) => boolean;
13
13
  ```
@@ -9,5 +9,5 @@ A function allowing custom logic to determine if the entity can walk.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- canWalk: (this: DefaultCharacterController) => boolean;
12
+ canWalk: (defaultCharacterController: DefaultCharacterController) => boolean;
13
13
  ```
@@ -101,7 +101,7 @@ Description
101
101
 
102
102
  </td><td>
103
103
 
104
- (this: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
104
+ (defaultCharacterController: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
105
105
 
106
106
 
107
107
  </td><td>
@@ -120,7 +120,7 @@ A function allowing custom logic to determine if the entity can jump.
120
120
 
121
121
  </td><td>
122
122
 
123
- (this: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
123
+ (defaultCharacterController: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
124
124
 
125
125
 
126
126
  </td><td>
@@ -139,7 +139,7 @@ A function allowing custom logic to determine if the entity can run.
139
139
 
140
140
  </td><td>
141
141
 
142
- (this: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
142
+ (defaultCharacterController: [DefaultCharacterController](./server.defaultcharactercontroller.md)<!-- -->) =&gt; boolean
143
143
 
144
144
 
145
145
  </td><td>
@@ -4,10 +4,10 @@
4
4
 
5
5
  ## HYTOPIA.Entity.createCustomCharacterController property
6
6
 
7
- A function that creates a custom character controller for the entity.
7
+ A function that creates a custom character controller for the entity when it spawns.
8
8
 
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- createCustomCharacterController?: (this: Entity) => BaseCharacterController;
12
+ createCustomCharacterController?: (entity: Entity) => BaseCharacterController;
13
13
  ```
@@ -133,12 +133,12 @@ The character controller for the entity.
133
133
 
134
134
  </td><td>
135
135
 
136
- (this: [Entity](./server.entity.md)<!-- -->) =&gt; [BaseCharacterController](./server.basecharactercontroller.md)
136
+ (entity: [Entity](./server.entity.md)<!-- -->) =&gt; [BaseCharacterController](./server.basecharactercontroller.md)
137
137
 
138
138
 
139
139
  </td><td>
140
140
 
141
- _(Optional)_ A function that creates a custom character controller for the entity.
141
+ _(Optional)_ A function that creates a custom character controller for the entity when it spawns.
142
142
 
143
143
 
144
144
  </td></tr>
@@ -278,7 +278,7 @@ The name of the entity.
278
278
 
279
279
  </td><td>
280
280
 
281
- (this: [Entity](./server.entity.md)<!-- -->, block: [BlockType](./server.blocktype.md)<!-- -->, started: boolean) =&gt; void
281
+ (entity: [Entity](./server.entity.md)<!-- -->, block: [BlockType](./server.blocktype.md)<!-- -->, started: boolean) =&gt; void
282
282
 
283
283
 
284
284
  </td><td>
@@ -297,7 +297,7 @@ _(Optional)_ A function that is called when the entity collides with a block.
297
297
 
298
298
  </td><td>
299
299
 
300
- (this: [Entity](./server.entity.md)<!-- -->, block: [BlockType](./server.blocktype.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
300
+ (entity: [Entity](./server.entity.md)<!-- -->, block: [BlockType](./server.blocktype.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
301
301
 
302
302
 
303
303
  </td><td>
@@ -316,7 +316,7 @@ _(Optional)_ A function that is called when the entity collides with a block.
316
316
 
317
317
  </td><td>
318
318
 
319
- (this: [Entity](./server.entity.md)<!-- -->) =&gt; void
319
+ (entity: [Entity](./server.entity.md)<!-- -->) =&gt; void
320
320
 
321
321
 
322
322
  </td><td>
@@ -335,7 +335,7 @@ _(Optional)_ A function that is called when the entity is despawned.
335
335
 
336
336
  </td><td>
337
337
 
338
- (this: [Entity](./server.entity.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, started: boolean) =&gt; void
338
+ (entity: [Entity](./server.entity.md)<!-- -->, otherEntity: [Entity](./server.entity.md)<!-- -->, started: boolean) =&gt; void
339
339
 
340
340
 
341
341
  </td><td>
@@ -354,7 +354,7 @@ _(Optional)_ A function that is called when the entity collides with another ent
354
354
 
355
355
  </td><td>
356
356
 
357
- (this: [Entity](./server.entity.md)<!-- -->, entity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
357
+ (entity: [Entity](./server.entity.md)<!-- -->, otherEntity: [Entity](./server.entity.md)<!-- -->, contactForceData: ContactForceData) =&gt; void
358
358
 
359
359
 
360
360
  </td><td>
@@ -373,7 +373,7 @@ _(Optional)_ A function that is called when the entity contacts another entity.
373
373
 
374
374
  </td><td>
375
375
 
376
- (this: [Entity](./server.entity.md)<!-- -->) =&gt; void
376
+ (entity: [Entity](./server.entity.md)<!-- -->) =&gt; void
377
377
 
378
378
 
379
379
  </td><td>
@@ -392,7 +392,7 @@ _(Optional)_ A function that is called when the entity is spawned.
392
392
 
393
393
  </td><td>
394
394
 
395
- (this: [Entity](./server.entity.md)<!-- -->, tickDeltaMs: number) =&gt; void
395
+ (entity: [Entity](./server.entity.md)<!-- -->, tickDeltaMs: number) =&gt; void
396
396
 
397
397
 
398
398
  </td><td>
@@ -9,5 +9,5 @@ A function that is called when the entity collides with a block.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onBlockCollision?: (this: Entity, block: BlockType, started: boolean) => void;
12
+ onBlockCollision?: (entity: Entity, block: BlockType, started: boolean) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called when the entity collides with a block.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onBlockContactForce?: (this: Entity, block: BlockType, contactForceData: ContactForceData) => void;
12
+ onBlockContactForce?: (entity: Entity, block: BlockType, contactForceData: ContactForceData) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called when the entity is despawned.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onDespawn?: (this: Entity) => void;
12
+ onDespawn?: (entity: Entity) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called when the entity collides with another entity.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onEntityCollision?: (this: Entity, entity: Entity, started: boolean) => void;
12
+ onEntityCollision?: (entity: Entity, otherEntity: Entity, started: boolean) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called when the entity contacts another entity.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onEntityContactForce?: (this: Entity, entity: Entity, contactForceData: ContactForceData) => void;
12
+ onEntityContactForce?: (entity: Entity, otherEntity: Entity, contactForceData: ContactForceData) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called when the entity is spawned.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onSpawn?: (this: Entity) => void;
12
+ onSpawn?: (entity: Entity) => void;
13
13
  ```
@@ -9,5 +9,5 @@ A function that is called every tick.
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- onTick?: (this: Entity, tickDeltaMs: number) => void;
12
+ onTick?: (entity: Entity, tickDeltaMs: number) => void;
13
13
  ```
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [HYTOPIA](./server.hytopia.md) &gt; [EntityOptions](./server.hytopia.entityoptions.md) &gt; [createCustomCharacterController](./server.hytopia.entityoptions.createcustomcharactercontroller.md)
4
+
5
+ ## HYTOPIA.EntityOptions.createCustomCharacterController property
6
+
7
+ A function that creates a custom character controller for the entity when it spawns.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ createCustomCharacterController?: (entity: Entity) => BaseCharacterController;
13
+ ```
@@ -37,6 +37,25 @@ Description
37
37
  </th></tr></thead>
38
38
  <tbody><tr><td>
39
39
 
40
+ [createCustomCharacterController?](./server.hytopia.entityoptions.createcustomcharactercontroller.md)
41
+
42
+
43
+ </td><td>
44
+
45
+
46
+ </td><td>
47
+
48
+ (entity: [Entity](./server.entity.md)<!-- -->) =&gt; [BaseCharacterController](./server.basecharactercontroller.md)
49
+
50
+
51
+ </td><td>
52
+
53
+ _(Optional)_ A function that creates a custom character controller for the entity when it spawns.
54
+
55
+
56
+ </td></tr>
57
+ <tr><td>
58
+
40
59
  [modelLoopedAnimations?](./server.hytopia.entityoptions.modelloopedanimations.md)
41
60
 
42
61
 
@@ -12,6 +12,11 @@ Options for the [SimpleCharacterController.move()](./server.simplecharactercontr
12
12
  export type MoveOptions = {
13
13
  moveCallback?: MoveCallback;
14
14
  moveCompleteCallback?: MoveCompleteCallback;
15
+ moveIgnoreAxes?: {
16
+ x?: boolean;
17
+ y?: boolean;
18
+ z?: boolean;
19
+ };
15
20
  };
16
21
  ```
17
22
  **References:** [MoveCallback](./server.movecallback.md)<!-- -->, [MoveCompleteCallback](./server.movecompletecallback.md)
@@ -15,7 +15,7 @@ export default class SimpleCharacterController extends BaseCharacterController
15
15
 
16
16
  ## Remarks
17
17
 
18
- This class implements simple movement methods that serve as a way to add realistic movement and rotational facing functionality to an entity. This is also a great base to extend for your own more complex character controller that implements things like pathfinding.
18
+ This class implements simple movement methods that serve as a way to add realistic movement and rotational facing functionality to an entity. This is also a great base to extend for your own more complex character controller that implements things like pathfinding. Compatible with entities that have kinematic or dynamic rigid body types.
19
19
 
20
20
  ## Example
21
21
 
@@ -12,6 +12,11 @@ Options for the [SimpleCharacterController.move()](./server.simplecharactercontr
12
12
  export type MoveOptions = {
13
13
  moveCallback?: MoveCallback;
14
14
  moveCompleteCallback?: MoveCompleteCallback;
15
+ moveIgnoreAxes?: {
16
+ x?: boolean;
17
+ y?: boolean;
18
+ z?: boolean;
19
+ };
15
20
  };
16
21
  ```
17
22
  **References:** [MoveCallback](./server.movecallback.md)<!-- -->, [MoveCompleteCallback](./server.movecompletecallback.md)
@@ -15,7 +15,7 @@ export default class SimpleCharacterController extends BaseCharacterController
15
15
 
16
16
  ## Remarks
17
17
 
18
- This class implements simple movement methods that serve as a way to add realistic movement and rotational facing functionality to an entity. This is also a great base to extend for your own more complex character controller that implements things like pathfinding.
18
+ This class implements simple movement methods that serve as a way to add realistic movement and rotational facing functionality to an entity. This is also a great base to extend for your own more complex character controller that implements things like pathfinding. Compatible with entities that have kinematic or dynamic rigid body types.
19
19
 
20
20
  ## Example
21
21
 
@@ -56,7 +56,7 @@ startServer(world => {
56
56
  });
57
57
 
58
58
  // A simple collision callback that logs when the spider collides with another Entity.
59
- spider.onEntityCollision = (otherEntity, started) => {
59
+ spider.onEntityCollision = (spider, otherEntity, started) => {
60
60
  console.log('spider colliding with', otherEntity.name, started);
61
61
  };
62
62