hytopia 0.1.27 → 0.1.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/bin/scripts.js +1 -0
  2. package/docs/server.basecharactercontroller.md +5 -5
  3. package/docs/server.basecharactercontroller.ontick.md +13 -0
  4. package/docs/server.basecharactercontroller.tick.md +53 -0
  5. package/docs/server.blocktype.md +2 -2
  6. package/docs/server.blocktype.onentitycollision.md +1 -1
  7. package/docs/server.blocktype.onentitycontactforce.md +1 -1
  8. package/docs/server.defaultcharactercontroller.canjump.md +1 -1
  9. package/docs/server.defaultcharactercontroller.canrun.md +1 -1
  10. package/docs/server.defaultcharactercontroller.canwalk.md +1 -1
  11. package/docs/server.defaultcharactercontroller.md +3 -17
  12. package/docs/server.entity.createcustomcharactercontroller.md +2 -2
  13. package/docs/server.entity.md +9 -9
  14. package/docs/server.entity.onblockcollision.md +1 -1
  15. package/docs/server.entity.onblockcontactforce.md +1 -1
  16. package/docs/server.entity.ondespawn.md +1 -1
  17. package/docs/server.entity.onentitycollision.md +1 -1
  18. package/docs/server.entity.onentitycontactforce.md +1 -1
  19. package/docs/server.entity.onspawn.md +1 -1
  20. package/docs/server.entity.ontick.md +1 -1
  21. package/docs/server.entityoptions.createcustomcharactercontroller.md +13 -0
  22. package/docs/server.entityoptions.md +19 -0
  23. package/docs/server.facecallback.md +15 -0
  24. package/docs/server.facecompletecallback.md +15 -0
  25. package/docs/server.faceoptions.md +18 -0
  26. package/docs/server.hytopia.basecharactercontroller.md +5 -5
  27. package/docs/server.hytopia.basecharactercontroller.ontick.md +13 -0
  28. package/docs/server.hytopia.basecharactercontroller.tick.md +53 -0
  29. package/docs/server.hytopia.blocktype.md +2 -2
  30. package/docs/server.hytopia.blocktype.onentitycollision.md +1 -1
  31. package/docs/server.hytopia.blocktype.onentitycontactforce.md +1 -1
  32. package/docs/server.hytopia.defaultcharactercontroller.canjump.md +1 -1
  33. package/docs/server.hytopia.defaultcharactercontroller.canrun.md +1 -1
  34. package/docs/server.hytopia.defaultcharactercontroller.canwalk.md +1 -1
  35. package/docs/server.hytopia.defaultcharactercontroller.md +3 -17
  36. package/docs/server.hytopia.entity.createcustomcharactercontroller.md +2 -2
  37. package/docs/server.hytopia.entity.md +9 -9
  38. package/docs/server.hytopia.entity.onblockcollision.md +1 -1
  39. package/docs/server.hytopia.entity.onblockcontactforce.md +1 -1
  40. package/docs/server.hytopia.entity.ondespawn.md +1 -1
  41. package/docs/server.hytopia.entity.onentitycollision.md +1 -1
  42. package/docs/server.hytopia.entity.onentitycontactforce.md +1 -1
  43. package/docs/server.hytopia.entity.onspawn.md +1 -1
  44. package/docs/server.hytopia.entity.ontick.md +1 -1
  45. package/docs/server.hytopia.entityoptions.createcustomcharactercontroller.md +13 -0
  46. package/docs/server.hytopia.entityoptions.md +19 -0
  47. package/docs/server.hytopia.facecallback.md +15 -0
  48. package/docs/server.hytopia.facecompletecallback.md +15 -0
  49. package/docs/server.hytopia.faceoptions.md +18 -0
  50. package/docs/server.hytopia.md +77 -0
  51. package/docs/server.hytopia.movecallback.md +15 -0
  52. package/docs/server.hytopia.movecompletecallback.md +15 -0
  53. package/docs/server.hytopia.moveoptions.md +23 -0
  54. package/docs/server.hytopia.simplecharactercontroller.face.md +89 -0
  55. package/docs/server.hytopia.simplecharactercontroller.md +88 -0
  56. package/docs/server.hytopia.simplecharactercontroller.move.md +89 -0
  57. package/docs/server.md +77 -0
  58. package/docs/server.movecallback.md +15 -0
  59. package/docs/server.movecompletecallback.md +15 -0
  60. package/docs/server.moveoptions.md +23 -0
  61. package/docs/server.simplecharactercontroller.face.md +89 -0
  62. package/docs/server.simplecharactercontroller.md +88 -0
  63. package/docs/server.simplecharactercontroller.move.md +89 -0
  64. package/examples/entity-spawn/index.ts +1 -1
  65. package/examples/payload-game/index.ts +46 -104
  66. package/package.json +1 -1
  67. package/server.api.json +1048 -264
  68. package/server.d.ts +191 -51
  69. package/server.js +57 -57
  70. package/tsconfig.json +4 -1
  71. package/docs/server.basecharactercontroller.ontickpathfindingmovement.md +0 -13
  72. package/docs/server.basecharactercontroller.tickpathfindingmovement.md +0 -69
  73. package/docs/server.defaultcharactercontroller.tickpathfindingmovement.md +0 -69
  74. package/docs/server.hytopia.basecharactercontroller.ontickpathfindingmovement.md +0 -13
  75. package/docs/server.hytopia.basecharactercontroller.tickpathfindingmovement.md +0 -69
  76. package/docs/server.hytopia.defaultcharactercontroller.tickpathfindingmovement.md +0 -69
  77. package/examples/character-controller/tsconfig.json +0 -27
  78. package/examples/entity-spawn/tsconfig.json +0 -27
  79. 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
 
@@ -96,7 +96,7 @@ The entity the controller is for.
96
96
  </td></tr>
97
97
  <tr><td>
98
98
 
99
- [onTickPathfindingMovement?](./server.basecharactercontroller.ontickpathfindingmovement.md)
99
+ [onTick?](./server.basecharactercontroller.ontick.md)
100
100
 
101
101
 
102
102
  </td><td>
@@ -104,12 +104,12 @@ The entity the controller is for.
104
104
 
105
105
  </td><td>
106
106
 
107
- (destination: [Vector3](./server.vector3.md)<!-- -->, deltaTimeMs: number) =&gt; void
107
+ (deltaTimeMs: number) =&gt; void
108
108
 
109
109
 
110
110
  </td><td>
111
111
 
112
- _(Optional)_ A callback function for when the controller ticks pathfinding movement.
112
+ _(Optional)_ A callback function for when the controller ticks.
113
113
 
114
114
 
115
115
  </td></tr>
@@ -168,7 +168,7 @@ Override this method to create sensor colliders to be attached to the controlled
168
168
  </td></tr>
169
169
  <tr><td>
170
170
 
171
- [tickPathfindingMovement(destination, deltaTimeMs)](./server.basecharactercontroller.tickpathfindingmovement.md)
171
+ [tick(deltaTimeMs)](./server.basecharactercontroller.tick.md)
172
172
 
173
173
 
174
174
  </td><td>
@@ -176,7 +176,7 @@ Override this method to create sensor colliders to be attached to the controlled
176
176
 
177
177
  </td><td>
178
178
 
179
- Override this method to implement pathfinding movement logic for your character controller. NOTE: This method is not fully supported yet.
179
+ Override this method to handle entity movements based on your character controller.
180
180
 
181
181
 
182
182
  </td></tr>
@@ -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; [BaseCharacterController](./server.basecharactercontroller.md) &gt; [onTick](./server.basecharactercontroller.ontick.md)
4
+
5
+ ## BaseCharacterController.onTick property
6
+
7
+ A callback function for when the controller ticks.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ onTick?: (deltaTimeMs: number) => void;
13
+ ```
@@ -0,0 +1,53 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [BaseCharacterController](./server.basecharactercontroller.md) &gt; [tick](./server.basecharactercontroller.tick.md)
4
+
5
+ ## BaseCharacterController.tick() method
6
+
7
+ Override this method to handle entity movements based on your character controller.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ tick(deltaTimeMs: number): 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
+ deltaTimeMs
36
+
37
+
38
+ </td><td>
39
+
40
+ number
41
+
42
+
43
+ </td><td>
44
+
45
+ The delta time in milliseconds since the last tick.
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+ **Returns:**
51
+
52
+ void
53
+
@@ -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>
@@ -301,20 +301,6 @@ Description
301
301
  Creates the sensor colliders for the character controller, overriding the default implementation.
302
302
 
303
303
 
304
- </td></tr>
305
- <tr><td>
306
-
307
- [tickPathfindingMovement(destination, deltaTimeMs)](./server.defaultcharactercontroller.tickpathfindingmovement.md)
308
-
309
-
310
- </td><td>
311
-
312
-
313
- </td><td>
314
-
315
- Ticks the pathfinding movement for the character controller, overriding the default implementation.
316
-
317
-
318
304
  </td></tr>
319
305
  <tr><td>
320
306
 
@@ -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
 
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [FaceCallback](./server.facecallback.md)
4
+
5
+ ## FaceCallback type
6
+
7
+ A callback function called when the entity associated with the SimpleCharacterController updates its rotation as it is attempting to face a target coordinate.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type FaceCallback = (currentRotation: Rotation, targetRotation: Rotation) => void;
13
+ ```
14
+ **References:** [Rotation](./server.rotation.md)
15
+
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [FaceCompleteCallback](./server.facecompletecallback.md)
4
+
5
+ ## FaceCompleteCallback type
6
+
7
+ A callback function called when the entity associated with the SimpleCharacterController finishes rotating and is now facing a target coordinate.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type FaceCompleteCallback = (endRotation: Rotation) => void;
13
+ ```
14
+ **References:** [Rotation](./server.rotation.md)
15
+
@@ -0,0 +1,18 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [FaceOptions](./server.faceoptions.md)
4
+
5
+ ## FaceOptions type
6
+
7
+ Options for the [SimpleCharacterController.face()](./server.simplecharactercontroller.face.md) method.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type FaceOptions = {
13
+ faceCallback?: FaceCallback;
14
+ faceCompleteCallback?: FaceCompleteCallback;
15
+ };
16
+ ```
17
+ **References:** [FaceCallback](./server.facecallback.md)<!-- -->, [FaceCompleteCallback](./server.facecompletecallback.md)
18
+
@@ -96,7 +96,7 @@ The entity the controller is for.
96
96
  </td></tr>
97
97
  <tr><td>
98
98
 
99
- [onTickPathfindingMovement?](./server.hytopia.basecharactercontroller.ontickpathfindingmovement.md)
99
+ [onTick?](./server.hytopia.basecharactercontroller.ontick.md)
100
100
 
101
101
 
102
102
  </td><td>
@@ -104,12 +104,12 @@ The entity the controller is for.
104
104
 
105
105
  </td><td>
106
106
 
107
- (destination: [Vector3](./server.vector3.md)<!-- -->, deltaTimeMs: number) =&gt; void
107
+ (deltaTimeMs: number) =&gt; void
108
108
 
109
109
 
110
110
  </td><td>
111
111
 
112
- _(Optional)_ A callback function for when the controller ticks pathfinding movement.
112
+ _(Optional)_ A callback function for when the controller ticks.
113
113
 
114
114
 
115
115
  </td></tr>
@@ -168,7 +168,7 @@ Override this method to create sensor colliders to be attached to the controlled
168
168
  </td></tr>
169
169
  <tr><td>
170
170
 
171
- [tickPathfindingMovement(destination, deltaTimeMs)](./server.hytopia.basecharactercontroller.tickpathfindingmovement.md)
171
+ [tick(deltaTimeMs)](./server.hytopia.basecharactercontroller.tick.md)
172
172
 
173
173
 
174
174
  </td><td>
@@ -176,7 +176,7 @@ Override this method to create sensor colliders to be attached to the controlled
176
176
 
177
177
  </td><td>
178
178
 
179
- Override this method to implement pathfinding movement logic for your character controller. NOTE: This method is not fully supported yet.
179
+ Override this method to handle entity movements based on your character controller.
180
180
 
181
181
 
182
182
  </td></tr>
@@ -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; [BaseCharacterController](./server.hytopia.basecharactercontroller.md) &gt; [onTick](./server.hytopia.basecharactercontroller.ontick.md)
4
+
5
+ ## HYTOPIA.BaseCharacterController.onTick property
6
+
7
+ A callback function for when the controller ticks.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ onTick?: (deltaTimeMs: number) => void;
13
+ ```
@@ -0,0 +1,53 @@
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; [BaseCharacterController](./server.hytopia.basecharactercontroller.md) &gt; [tick](./server.hytopia.basecharactercontroller.tick.md)
4
+
5
+ ## HYTOPIA.BaseCharacterController.tick() method
6
+
7
+ Override this method to handle entity movements based on your character controller.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ tick(deltaTimeMs: number): 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
+ deltaTimeMs
36
+
37
+
38
+ </td><td>
39
+
40
+ number
41
+
42
+
43
+ </td><td>
44
+
45
+ The delta time in milliseconds since the last tick.
46
+
47
+
48
+ </td></tr>
49
+ </tbody></table>
50
+ **Returns:**
51
+
52
+ void
53
+
@@ -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
  ```