hytopia 0.1.26 → 0.1.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. package/README.md +2 -1
  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.defaultcharactercontroller.md +0 -14
  6. package/docs/server.facecallback.md +15 -0
  7. package/docs/server.facecompletecallback.md +15 -0
  8. package/docs/server.faceoptions.md +18 -0
  9. package/docs/server.hytopia.basecharactercontroller.md +5 -5
  10. package/docs/server.hytopia.basecharactercontroller.ontick.md +13 -0
  11. package/docs/server.hytopia.basecharactercontroller.tick.md +53 -0
  12. package/docs/server.hytopia.defaultcharactercontroller.md +0 -14
  13. package/docs/server.hytopia.facecallback.md +15 -0
  14. package/docs/server.hytopia.facecompletecallback.md +15 -0
  15. package/docs/server.hytopia.faceoptions.md +18 -0
  16. package/docs/server.hytopia.md +99 -0
  17. package/docs/server.hytopia.movecallback.md +15 -0
  18. package/docs/server.hytopia.movecompletecallback.md +15 -0
  19. package/docs/server.hytopia.moveoptions.md +18 -0
  20. package/docs/server.hytopia.simplecharactercontroller.face.md +89 -0
  21. package/docs/server.hytopia.simplecharactercontroller.md +88 -0
  22. package/docs/server.hytopia.simplecharactercontroller.move.md +89 -0
  23. package/docs/server.hytopia.worldloopeventpayload.md +73 -0
  24. package/docs/server.hytopia.worldloopeventpayload.start.md +53 -0
  25. package/docs/server.hytopia.worldloopeventpayload.start.worldloop.md +11 -0
  26. package/docs/server.hytopia.worldloopeventpayload.stop.md +53 -0
  27. package/docs/server.hytopia.worldloopeventpayload.stop.worldloop.md +11 -0
  28. package/docs/server.hytopia.worldloopeventpayload.tickend.md +70 -0
  29. package/docs/server.hytopia.worldloopeventpayload.tickend.tickdurationms.md +11 -0
  30. package/docs/server.hytopia.worldloopeventpayload.tickend.worldloop.md +11 -0
  31. package/docs/server.hytopia.worldloopeventpayload.tickerror.error.md +11 -0
  32. package/docs/server.hytopia.worldloopeventpayload.tickerror.md +70 -0
  33. package/docs/server.hytopia.worldloopeventpayload.tickerror.worldloop.md +11 -0
  34. package/docs/server.hytopia.worldloopeventpayload.tickstart.md +70 -0
  35. package/docs/server.hytopia.worldloopeventpayload.tickstart.tickdeltams.md +11 -0
  36. package/docs/server.hytopia.worldloopeventpayload.tickstart.worldloop.md +11 -0
  37. package/docs/server.hytopia.worldloopeventtype.md +103 -0
  38. package/docs/server.md +99 -0
  39. package/docs/server.movecallback.md +15 -0
  40. package/docs/server.movecompletecallback.md +15 -0
  41. package/docs/server.moveoptions.md +18 -0
  42. package/docs/server.simplecharactercontroller.face.md +89 -0
  43. package/docs/server.simplecharactercontroller.md +88 -0
  44. package/docs/server.simplecharactercontroller.move.md +89 -0
  45. package/docs/server.worldloopeventpayload.md +73 -0
  46. package/docs/server.worldloopeventpayload.start.md +53 -0
  47. package/docs/server.worldloopeventpayload.start.worldloop.md +11 -0
  48. package/docs/server.worldloopeventpayload.stop.md +53 -0
  49. package/docs/server.worldloopeventpayload.stop.worldloop.md +11 -0
  50. package/docs/server.worldloopeventpayload.tickend.md +70 -0
  51. package/docs/server.worldloopeventpayload.tickend.tickdurationms.md +11 -0
  52. package/docs/server.worldloopeventpayload.tickend.worldloop.md +11 -0
  53. package/docs/server.worldloopeventpayload.tickerror.error.md +11 -0
  54. package/docs/server.worldloopeventpayload.tickerror.md +70 -0
  55. package/docs/server.worldloopeventpayload.tickerror.worldloop.md +11 -0
  56. package/docs/server.worldloopeventpayload.tickstart.md +70 -0
  57. package/docs/server.worldloopeventpayload.tickstart.tickdeltams.md +11 -0
  58. package/docs/server.worldloopeventpayload.tickstart.worldloop.md +11 -0
  59. package/docs/server.worldloopeventtype.md +103 -0
  60. package/package.json +1 -1
  61. package/server.api.json +1857 -263
  62. package/server.d.ts +175 -20
  63. package/server.js +60 -60
  64. package/docs/server.basecharactercontroller.ontickpathfindingmovement.md +0 -13
  65. package/docs/server.basecharactercontroller.tickpathfindingmovement.md +0 -69
  66. package/docs/server.defaultcharactercontroller.tickpathfindingmovement.md +0 -69
  67. package/docs/server.hytopia.basecharactercontroller.ontickpathfindingmovement.md +0 -13
  68. package/docs/server.hytopia.basecharactercontroller.tickpathfindingmovement.md +0 -69
  69. package/docs/server.hytopia.defaultcharactercontroller.tickpathfindingmovement.md +0 -69
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # HYTOPIA SDK
2
2
 
3
3
  ## Quick Links
4
- [Quickstart](#quickstart) • [API Reference](./docs/server.md) • [Examples](./examples) • [Join Our Developer Discord](https://discord.gg/hytopia-developers) • [Report Bugs or Request Features](https://github.com/hytopiagg/sdk/issues)
4
+ [Quickstart](#quickstart) • [Developer Docs](https://dev.hytopia.com/) • [API Reference](./docs/server.md) • [Examples](./examples) • [Join Our Developer Discord](https://discord.gg/hytopia-developers) • [Report Bugs or Request Features](https://github.com/hytopiagg/sdk/issues)
5
5
 
6
6
  ## What is HYTOPIA?
7
7
 
@@ -56,6 +56,7 @@ bun --watch index.ts
56
56
  **Note: If you'd prefer to use JavaScript instead of TypeScript, simply change the file extension of index.ts to index.js - Your editor will highlight the TypeScript syntax errors, simple delete the type annotations and everything should work the same without any TypeScript usage.**
57
57
 
58
58
  Once you're up and running, here's some other resources to go further:
59
+ - [Developer Docs](https://dev.hytopia.com/)
59
60
  - [Game Examples](./examples)
60
61
  - [API Reference](./docs/server.md)
61
62
 
@@ -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
+
@@ -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
 
@@ -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
+
@@ -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.hytopia.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
 
@@ -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; [HYTOPIA](./server.hytopia.md) &gt; [FaceCallback](./server.hytopia.facecallback.md)
4
+
5
+ ## HYTOPIA.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; [HYTOPIA](./server.hytopia.md) &gt; [FaceCompleteCallback](./server.hytopia.facecompletecallback.md)
4
+
5
+ ## HYTOPIA.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; [HYTOPIA](./server.hytopia.md) &gt; [FaceOptions](./server.hytopia.faceoptions.md)
4
+
5
+ ## HYTOPIA.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
+
@@ -225,6 +225,17 @@ Manages all connected players in a game server.
225
225
  Represents a rigid body in a world's physics simulation.
226
226
 
227
227
 
228
+ </td></tr>
229
+ <tr><td>
230
+
231
+ [SimpleCharacterController](./server.hytopia.simplecharactercontroller.md)
232
+
233
+
234
+ </td><td>
235
+
236
+ A simple character controller with basic movement functions.
237
+
238
+
228
239
  </td></tr>
229
240
  <tr><td>
230
241
 
@@ -420,6 +431,17 @@ Event types a Player can emit.
420
431
  The types a RigidBody can be.
421
432
 
422
433
 
434
+ </td></tr>
435
+ <tr><td>
436
+
437
+ [WorldLoopEventType](./server.hytopia.worldloopeventtype.md)
438
+
439
+
440
+ </td><td>
441
+
442
+ Event types a WorldLoop instance can emit.
443
+
444
+
423
445
  </td></tr>
424
446
  </tbody></table>
425
447
 
@@ -707,6 +729,17 @@ Payloads for events emitted by a GameServer instance.
707
729
  Payloads for events a Player can emit.
708
730
 
709
731
 
732
+ </td></tr>
733
+ <tr><td>
734
+
735
+ [WorldLoopEventPayload](./server.hytopia.worldloopeventpayload.md)
736
+
737
+
738
+ </td><td>
739
+
740
+ Payloads for events emitted by a WorldLoop instance.
741
+
742
+
710
743
  </td></tr>
711
744
  </tbody></table>
712
745
 
@@ -814,6 +847,72 @@ A callback function for a chat command.
814
847
  A decoded set of collision groups represented as their string equivalents.
815
848
 
816
849
 
850
+ </td></tr>
851
+ <tr><td>
852
+
853
+ [FaceCallback](./server.hytopia.facecallback.md)
854
+
855
+
856
+ </td><td>
857
+
858
+ A callback function called when the entity associated with the SimpleCharacterController updates its rotation as it is attempting to face a target coordinate.
859
+
860
+
861
+ </td></tr>
862
+ <tr><td>
863
+
864
+ [FaceCompleteCallback](./server.hytopia.facecompletecallback.md)
865
+
866
+
867
+ </td><td>
868
+
869
+ A callback function called when the entity associated with the SimpleCharacterController finishes rotating and is now facing a target coordinate.
870
+
871
+
872
+ </td></tr>
873
+ <tr><td>
874
+
875
+ [FaceOptions](./server.hytopia.faceoptions.md)
876
+
877
+
878
+ </td><td>
879
+
880
+ Options for the [SimpleCharacterController.face()](./server.simplecharactercontroller.face.md) method.
881
+
882
+
883
+ </td></tr>
884
+ <tr><td>
885
+
886
+ [MoveCallback](./server.hytopia.movecallback.md)
887
+
888
+
889
+ </td><td>
890
+
891
+ A callback function called when the entity associated with the SimpleCharacterController updates its translation as it is attempting to move to a target coordinate.
892
+
893
+
894
+ </td></tr>
895
+ <tr><td>
896
+
897
+ [MoveCompleteCallback](./server.hytopia.movecompletecallback.md)
898
+
899
+
900
+ </td><td>
901
+
902
+ A callback function called when the entity associated with the SimpleCharacterController reaches the target coordinate. An entity must reach the x,y,z coordinate for the callback to be called.
903
+
904
+
905
+ </td></tr>
906
+ <tr><td>
907
+
908
+ [MoveOptions](./server.hytopia.moveoptions.md)
909
+
910
+
911
+ </td><td>
912
+
913
+ Options for the [SimpleCharacterController.move()](./server.simplecharactercontroller.move.md) method.
914
+
915
+
817
916
  </td></tr>
818
917
  <tr><td>
819
918
 
@@ -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; [HYTOPIA](./server.hytopia.md) &gt; [MoveCallback](./server.hytopia.movecallback.md)
4
+
5
+ ## HYTOPIA.MoveCallback type
6
+
7
+ A callback function called when the entity associated with the SimpleCharacterController updates its translation as it is attempting to move to a target coordinate.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type MoveCallback = (currentTranslation: Vector3, targetTranslation: Vector3) => void;
13
+ ```
14
+ **References:** [Vector3](./server.vector3.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; [HYTOPIA](./server.hytopia.md) &gt; [MoveCompleteCallback](./server.hytopia.movecompletecallback.md)
4
+
5
+ ## HYTOPIA.MoveCompleteCallback type
6
+
7
+ A callback function called when the entity associated with the SimpleCharacterController reaches the target coordinate. An entity must reach the x,y,z coordinate for the callback to be called.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type MoveCompleteCallback = (endTranslation: Vector3) => void;
13
+ ```
14
+ **References:** [Vector3](./server.vector3.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; [HYTOPIA](./server.hytopia.md) &gt; [MoveOptions](./server.hytopia.moveoptions.md)
4
+
5
+ ## HYTOPIA.MoveOptions type
6
+
7
+ Options for the [SimpleCharacterController.move()](./server.simplecharactercontroller.move.md) method.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ export type MoveOptions = {
13
+ moveCallback?: MoveCallback;
14
+ moveCompleteCallback?: MoveCompleteCallback;
15
+ };
16
+ ```
17
+ **References:** [MoveCallback](./server.movecallback.md)<!-- -->, [MoveCompleteCallback](./server.movecompletecallback.md)
18
+
@@ -0,0 +1,89 @@
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; [SimpleCharacterController](./server.hytopia.simplecharactercontroller.md) &gt; [face](./server.hytopia.simplecharactercontroller.face.md)
4
+
5
+ ## HYTOPIA.SimpleCharacterController.face() method
6
+
7
+ Rotates the entity at a given speed to face a target coordinate.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ face(target: Vector3, speed: number, options?: FaceOptions): 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
+ target
36
+
37
+
38
+ </td><td>
39
+
40
+ [Vector3](./server.vector3.md)
41
+
42
+
43
+ </td><td>
44
+
45
+ The target coordinate to face.
46
+
47
+
48
+ </td></tr>
49
+ <tr><td>
50
+
51
+ speed
52
+
53
+
54
+ </td><td>
55
+
56
+ number
57
+
58
+
59
+ </td><td>
60
+
61
+ The speed at which to rotate to the target coordinate.
62
+
63
+
64
+ </td></tr>
65
+ <tr><td>
66
+
67
+ options
68
+
69
+
70
+ </td><td>
71
+
72
+ [FaceOptions](./server.faceoptions.md)
73
+
74
+
75
+ </td><td>
76
+
77
+ _(Optional)_ Additional options for the face operation, such as callbacks.
78
+
79
+
80
+ </td></tr>
81
+ </tbody></table>
82
+ **Returns:**
83
+
84
+ void
85
+
86
+ ## Remarks
87
+
88
+ If this method is called while the entity is already attempting to face another target, the previous target will be ignored and the entity will start attempting to face the new target.
89
+