@origingame/engine 0.1.0 → 0.2.0

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.
Files changed (62) hide show
  1. package/dist/web/origin-engine.js +4 -4
  2. package/dist/web/origin-engine_bg.wasm +0 -0
  3. package/dist/web-publish/origin-engine-lanes.js +6 -6
  4. package/dist/web-publish/origin-engine-lanes_bg.wasm +0 -0
  5. package/dist/web-publish/origin-engine.js +4 -4
  6. package/dist/web-publish/origin-engine_bg.wasm +0 -0
  7. package/dist/web-publish-2d/origin-engine-lanes.js +6 -6
  8. package/dist/web-publish-2d/origin-engine-lanes_bg.wasm +0 -0
  9. package/dist/web-publish-2d/origin-engine.js +4 -4
  10. package/dist/web-publish-2d/origin-engine_bg.wasm +0 -0
  11. package/knowledge/package.json +4 -4
  12. package/knowledge/scaffold/origin-engine.json +2 -2
  13. package/knowledge/scaffold/template/gitignore +8 -0
  14. package/knowledge/scaffold/template/package.json +1 -1
  15. package/knowledge/scaffold/template/project.ogt +1 -1
  16. package/knowledge/scripts/lib.ts +5 -1
  17. package/knowledge/scripts/pack.ts +2 -1
  18. package/knowledge/scripts/validate.ts +2 -1
  19. package/knowledge/skills/og-build/SKILL.md +17 -1
  20. package/knowledge/skills/og-feel/SKILL.md +8 -1
  21. package/knowledge/skills/og-game/SKILL.md +117 -13
  22. package/knowledge/skills/og-i18n/SKILL.md +12 -3
  23. package/knowledge/skills/og-platform-sdk/SKILL.md +3 -1
  24. package/knowledge/skills/og-ui/SKILL.md +19 -6
  25. package/knowledge/wiki/ai.md +20 -20
  26. package/knowledge/wiki/anim.md +41 -41
  27. package/knowledge/wiki/atmosphere.md +13 -13
  28. package/knowledge/wiki/audio.md +18 -18
  29. package/knowledge/wiki/camera.md +13 -13
  30. package/knowledge/wiki/commands.md +11 -11
  31. package/knowledge/wiki/game.md +8 -8
  32. package/knowledge/wiki/i18n.md +7 -7
  33. package/knowledge/wiki/index.md +4 -1
  34. package/knowledge/wiki/input.md +47 -47
  35. package/knowledge/wiki/load.md +45 -45
  36. package/knowledge/wiki/math.md +7 -7
  37. package/knowledge/wiki/nav.md +34 -34
  38. package/knowledge/wiki/physics.md +124 -106
  39. package/knowledge/wiki/platform.md +31 -31
  40. package/knowledge/wiki/probe.md +66 -66
  41. package/knowledge/wiki/reflect.md +15 -15
  42. package/knowledge/wiki/render.md +99 -89
  43. package/knowledge/wiki/rng.md +14 -14
  44. package/knowledge/wiki/stream.md +15 -15
  45. package/knowledge/wiki/system.md +8 -8
  46. package/knowledge/wiki/systems.md +2 -2
  47. package/knowledge/wiki/terrain.md +19 -19
  48. package/knowledge/wiki/tilemap.md +19 -15
  49. package/knowledge/wiki/time.md +4 -4
  50. package/knowledge/wiki/transform.md +8 -8
  51. package/knowledge/wiki/tween.md +17 -17
  52. package/knowledge/wiki/ui.md +289 -245
  53. package/knowledge/wiki/world.md +67 -37
  54. package/package.json +6 -6
  55. package/schema/api.schema.json +134 -9
  56. package/src/index.ts +1 -0
  57. package/src/node/polish.ts +2 -1
  58. package/src/node/run.ts +5 -1
  59. package/src/runtime.ts +2 -0
  60. package/src/ui-kit/huds.ts +18 -14
  61. package/types/bindings.json +61 -26
  62. package/types/index.d.ts +144 -13
@@ -18,7 +18,7 @@ module physics {
18
18
  # declarations follow, each quoted below
19
19
  ```
20
20
 
21
- <sub>`api.ogt` line 3696</sub>
21
+ <sub>`api.ogt` line 3711</sub>
22
22
 
23
23
  ## Contents
24
24
 
@@ -61,15 +61,15 @@ module physics {
61
61
  | [`MOTOR_VELOCITY`](#const-MOTOR_VELOCITY) | constant | `Joint.motor`: drive towards `motorTarget` speed (rad/s or m/s). |
62
62
  | [`MOTOR_POSITION`](#const-MOTOR_POSITION) | constant | `Joint.motor`: spring towards `motorTarget` angle or position (a servo). |
63
63
  | [`og.Joint`](#record-Joint) | component | A joint between two bodies (or a body and a point of the world). The component may sit on one of the bodies (`body` 0) or on an entity of its own, so one body can have several joints. Anchors are in each body's frame (rotated and moved with it, not scaled); without `other` the second anchor is a world point. A joint whose bodies are not both `og.RigidBody` entities does nothing until they are. |
64
- | [`og.CharacterController`](#record-CharacterController) | component | A kinematic character (3D, or top-down 2D): the entity's capsule (or any og.Collider) moved by `move` each tick, sliding along walls, climbing slopes up to `maxSlope` and steps up to `stepHeight`, snapped to the ground, carried by the moving platform it stands on and falling by gravity. It keeps `skin` off every surface, standing that far over the ground; a step is climbed when the ground beyond it is at most `stepHeight` over the ground it stands on. What blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider; the step makes it a kinematic body and pushes dynamic bodies it walks into. |
65
- | [`og.PlatformerController`](#record-PlatformerController) | component | A 2D platformer character (the 2D profile): run, jump and fall with designer units (jump height and time to apex, not gravity), coyote time, jump buffering, variable jump height (releasing jump while rising cuts the jump), apex hang, air jumps, wall slide and wall jump, one-way platforms (colliders on `oneWayLayers` are solid from above only; hold `down` to drop through), moving platforms (it rides what it stands on) and corner correction (a jump that clips a ceiling corner by less than `cornerCorrection` slides past it). It keeps `skin` off every surface; what blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider (a box or capsule); it becomes a kinematic body. |
64
+ | [`og.CharacterController`](#record-CharacterController) | component | A kinematic character (3D, or top-down 2D): the entity's capsule (or any og.Collider) moved by `move` each tick, sliding along walls, climbing slopes up to `maxSlope` and steps up to `stepHeight`, snapped to the ground, carried by the moving platform it stands on and falling by gravity. It keeps `skin` off every surface, standing that far over the ground; a step is climbed when the ground beyond it is at most `stepHeight` over the ground it stands on. What blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider; the step makes it a kinematic body and pushes the dynamic bodies it walks into (`pushBodies`) with at most `pushStrength`, so a light one is shoved and a heavy one holds. |
65
+ | [`og.PlatformerController`](#record-PlatformerController) | component | A 2D platformer character (the 2D profile): run, jump and fall with designer units (jump height and time to apex, not gravity), coyote time, jump buffering, variable jump height (releasing jump while rising cuts the jump), apex hang, air jumps, wall slide and wall jump, one-way platforms (colliders on `oneWayLayers` are solid from above only; hold `down` to drop through), moving platforms (it rides what it stands on) and corner correction (a jump that clips a ceiling corner by less than `cornerCorrection` slides past it). It keeps `skin` off every surface; what blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider (a box or capsule); it becomes a kinematic body and pushes the dynamic bodies it runs into (`pushBodies`) with at most `pushStrength`, so a crate's mass tells: a light one is shoved at the run speed, a heavy one holds (set its og.RigidBody `mass`). |
66
66
  | [`CHARACTER_JUMPED`](#const-CHARACTER_JUMPED) | constant | `CharacterEvent.kind`: a jump from the ground (or in coyote time). |
67
67
  | [`CHARACTER_LANDED`](#const-CHARACTER_LANDED) | constant | `CharacterEvent.kind`: touched the ground after being in the air. |
68
68
  | [`CHARACTER_WALL_JUMPED`](#const-CHARACTER_WALL_JUMPED) | constant | `CharacterEvent.kind`: a jump off a wall. |
69
69
  | [`CHARACTER_AIR_JUMPED`](#const-CHARACTER_AIR_JUMPED) | constant | `CharacterEvent.kind`: a jump in the air (PlatformerController.airJumps). |
70
70
  | [`CHARACTER_LEFT_GROUND`](#const-CHARACTER_LEFT_GROUND) | constant | `CharacterEvent.kind`: left the ground without jumping (ran off an edge). |
71
71
  | [`CHARACTER_BUMPED`](#const-CHARACTER_BUMPED) | constant | `CharacterEvent.kind`: hit a ceiling while rising. |
72
- | [`og.CharacterEvent`](#record-CharacterEvent) | event | Something a CharacterController or PlatformerController did this step: the hooks for dust, squash, sounds and camera kicks. Read the next tick. |
72
+ | [`og.CharacterEvent`](#record-CharacterEvent) | event | Something a CharacterController or PlatformerController did this step: the hooks for dust, squash, sounds and camera kicks. Read the next tick: the controllers move in the physics step, after the game's systems, so a jump pressed in tick T moves the character in T and its CHARACTER_JUMPED is read in T + 1 (og-feel §12 has the same-tick alternative). |
73
73
  | [`DRIVE_REAR`](#const-DRIVE_REAR) | constant | `Vehicle.drive`: the rear wheels drive. |
74
74
  | [`DRIVE_FRONT`](#const-DRIVE_FRONT) | constant | `Vehicle.drive`: the front wheels drive. |
75
75
  | [`DRIVE_ALL`](#const-DRIVE_ALL) | constant | `Vehicle.drive`: every wheel drives. |
@@ -149,7 +149,7 @@ fn raycast {
149
149
  }
150
150
  ```
151
151
 
152
- <sub>`api.ogt` line 5004</sub>
152
+ <sub>`api.ogt` line 5034</sub>
153
153
 
154
154
  <a id="fn-shapeCast"></a>
155
155
 
@@ -179,7 +179,7 @@ fn shapeCast {
179
179
  }
180
180
  ```
181
181
 
182
- <sub>`api.ogt` line 5011</sub>
182
+ <sub>`api.ogt` line 5041</sub>
183
183
 
184
184
  <a id="fn-overlap"></a>
185
185
 
@@ -209,7 +209,7 @@ fn overlap {
209
209
  }
210
210
  ```
211
211
 
212
- <sub>`api.ogt` line 5018</sub>
212
+ <sub>`api.ogt` line 5048</sub>
213
213
 
214
214
  <a id="fn-applyForce"></a>
215
215
 
@@ -245,7 +245,7 @@ fn applyForce {
245
245
  }
246
246
  ```
247
247
 
248
- <sub>`api.ogt` line 5025</sub>
248
+ <sub>`api.ogt` line 5055</sub>
249
249
 
250
250
  <a id="fn-applyImpulse"></a>
251
251
 
@@ -281,7 +281,7 @@ fn applyImpulse {
281
281
  }
282
282
  ```
283
283
 
284
- <sub>`api.ogt` line 5036</sub>
284
+ <sub>`api.ogt` line 5066</sub>
285
285
 
286
286
  <a id="fn-applyTorque"></a>
287
287
 
@@ -313,7 +313,7 @@ fn applyTorque {
313
313
  }
314
314
  ```
315
315
 
316
- <sub>`api.ogt` line 5047</sub>
316
+ <sub>`api.ogt` line 5077</sub>
317
317
 
318
318
  <a id="fn-applyTorqueImpulse"></a>
319
319
 
@@ -345,7 +345,7 @@ fn applyTorqueImpulse {
345
345
  }
346
346
  ```
347
347
 
348
- <sub>`api.ogt` line 5055</sub>
348
+ <sub>`api.ogt` line 5085</sub>
349
349
 
350
350
  <a id="fn-setMesh"></a>
351
351
 
@@ -377,7 +377,7 @@ fn setMesh {
377
377
  }
378
378
  ```
379
379
 
380
- <sub>`api.ogt` line 5063</sub>
380
+ <sub>`api.ogt` line 5093</sub>
381
381
 
382
382
  <a id="fn-ropePoints"></a>
383
383
 
@@ -407,7 +407,7 @@ fn ropePoints {
407
407
  }
408
408
  ```
409
409
 
410
- <sub>`api.ogt` line 5124</sub>
410
+ <sub>`api.ogt` line 5154</sub>
411
411
 
412
412
  <a id="fn-clothPoints"></a>
413
413
 
@@ -437,7 +437,7 @@ fn clothPoints {
437
437
  }
438
438
  ```
439
439
 
440
- <sub>`api.ogt` line 5131</sub>
440
+ <sub>`api.ogt` line 5161</sub>
441
441
 
442
442
  <a id="fn-fluidParticles"></a>
443
443
 
@@ -467,7 +467,7 @@ fn fluidParticles {
467
467
  }
468
468
  ```
469
469
 
470
- <sub>`api.ogt` line 5138</sub>
470
+ <sub>`api.ogt` line 5168</sub>
471
471
 
472
472
  <a id="fn-fluid3dParticles"></a>
473
473
 
@@ -497,7 +497,7 @@ fn fluid3dParticles {
497
497
  }
498
498
  ```
499
499
 
500
- <sub>`api.ogt` line 5145</sub>
500
+ <sub>`api.ogt` line 5175</sub>
501
501
 
502
502
  <a id="fn-waterHeight"></a>
503
503
 
@@ -531,7 +531,7 @@ fn waterHeight {
531
531
  }
532
532
  ```
533
533
 
534
- <sub>`api.ogt` line 5152</sub>
534
+ <sub>`api.ogt` line 5182</sub>
535
535
 
536
536
  <a id="fn-vehicleWheels"></a>
537
537
 
@@ -561,7 +561,7 @@ fn vehicleWheels {
561
561
  }
562
562
  ```
563
563
 
564
- <sub>`api.ogt` line 5161</sub>
564
+ <sub>`api.ogt` line 5191</sub>
565
565
 
566
566
  <a id="fn-ragdollRigFromSkeleton"></a>
567
567
 
@@ -591,7 +591,7 @@ fn ragdollRigFromSkeleton {
591
591
  }
592
592
  ```
593
593
 
594
- <sub>`api.ogt` line 5168</sub>
594
+ <sub>`api.ogt` line 5198</sub>
595
595
 
596
596
  <a id="fn-setRagdollRig"></a>
597
597
 
@@ -623,7 +623,7 @@ fn setRagdollRig {
623
623
  }
624
624
  ```
625
625
 
626
- <sub>`api.ogt` line 5175</sub>
626
+ <sub>`api.ogt` line 5205</sub>
627
627
 
628
628
  <a id="fn-ragdollPose"></a>
629
629
 
@@ -653,7 +653,7 @@ fn ragdollPose {
653
653
  }
654
654
  ```
655
655
 
656
- <sub>`api.ogt` line 5183</sub>
656
+ <sub>`api.ogt` line 5213</sub>
657
657
 
658
658
  <a id="fn-stats"></a>
659
659
 
@@ -681,7 +681,7 @@ fn stats {
681
681
  }
682
682
  ```
683
683
 
684
- <sub>`api.ogt` line 5211</sub>
684
+ <sub>`api.ogt` line 5241</sub>
685
685
 
686
686
  ## Components, resources and events
687
687
 
@@ -753,7 +753,7 @@ component RigidBody {
753
753
  }
754
754
  ```
755
755
 
756
- <sub>`api.ogt` line 3721</sub>
756
+ <sub>`api.ogt` line 3736</sub>
757
757
 
758
758
  <a id="record-Collider"></a>
759
759
 
@@ -840,7 +840,7 @@ component Collider {
840
840
  }
841
841
  ```
842
842
 
843
- <sub>`api.ogt` line 3766</sub>
843
+ <sub>`api.ogt` line 3781</sub>
844
844
 
845
845
  <a id="record-Velocity"></a>
846
846
 
@@ -869,7 +869,7 @@ component Velocity {
869
869
  }
870
870
  ```
871
871
 
872
- <sub>`api.ogt` line 3825</sub>
872
+ <sub>`api.ogt` line 3840</sub>
873
873
 
874
874
  <a id="record-Physics"></a>
875
875
 
@@ -923,7 +923,7 @@ resource Physics {
923
923
  }
924
924
  ```
925
925
 
926
- <sub>`api.ogt` line 3837</sub>
926
+ <sub>`api.ogt` line 3852</sub>
927
927
 
928
928
  <a id="record-CollisionStarted"></a>
929
929
 
@@ -950,7 +950,7 @@ event CollisionStarted {
950
950
  }
951
951
  ```
952
952
 
953
- <sub>`api.ogt` line 3871</sub>
953
+ <sub>`api.ogt` line 3886</sub>
954
954
 
955
955
  <a id="record-CollisionEnded"></a>
956
956
 
@@ -973,7 +973,7 @@ event CollisionEnded {
973
973
  }
974
974
  ```
975
975
 
976
- <sub>`api.ogt` line 3879</sub>
976
+ <sub>`api.ogt` line 3894</sub>
977
977
 
978
978
  <a id="record-SensorEntered"></a>
979
979
 
@@ -996,7 +996,7 @@ event SensorEntered {
996
996
  }
997
997
  ```
998
998
 
999
- <sub>`api.ogt` line 3885</sub>
999
+ <sub>`api.ogt` line 3900</sub>
1000
1000
 
1001
1001
  <a id="record-SensorExited"></a>
1002
1002
 
@@ -1019,7 +1019,7 @@ event SensorExited {
1019
1019
  }
1020
1020
  ```
1021
1021
 
1022
- <sub>`api.ogt` line 3891</sub>
1022
+ <sub>`api.ogt` line 3906</sub>
1023
1023
 
1024
1024
  <a id="record-Contact"></a>
1025
1025
 
@@ -1044,7 +1044,7 @@ event Contact {
1044
1044
  }
1045
1045
  ```
1046
1046
 
1047
- <sub>`api.ogt` line 3897</sub>
1047
+ <sub>`api.ogt` line 3912</sub>
1048
1048
 
1049
1049
  <a id="record-Joint"></a>
1050
1050
 
@@ -1149,13 +1149,13 @@ component Joint {
1149
1149
  }
1150
1150
  ```
1151
1151
 
1152
- <sub>`api.ogt` line 3914</sub>
1152
+ <sub>`api.ogt` line 3929</sub>
1153
1153
 
1154
1154
  <a id="record-CharacterController"></a>
1155
1155
 
1156
1156
  ### `og.CharacterController` (component)
1157
1157
 
1158
- A kinematic character (3D, or top-down 2D): the entity's capsule (or any og.Collider) moved by `move` each tick, sliding along walls, climbing slopes up to `maxSlope` and steps up to `stepHeight`, snapped to the ground, carried by the moving platform it stands on and falling by gravity. It keeps `skin` off every surface, standing that far over the ground; a step is climbed when the ground beyond it is at most `stepHeight` over the ground it stands on. What blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider; the step makes it a kinematic body and pushes dynamic bodies it walks into.
1158
+ A kinematic character (3D, or top-down 2D): the entity's capsule (or any og.Collider) moved by `move` each tick, sliding along walls, climbing slopes up to `maxSlope` and steps up to `stepHeight`, snapped to the ground, carried by the moving platform it stands on and falling by gravity. It keeps `skin` off every surface, standing that far over the ground; a step is climbed when the ground beyond it is at most `stepHeight` over the ground it stands on. What blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider; the step makes it a kinematic body and pushes the dynamic bodies it walks into (`pushBodies`) with at most `pushStrength`, so a light one is shoved and a heavy one holds.
1159
1159
 
1160
1160
  Token `og.CharacterController`, registered under the schema name `og.CharacterController`; its value type is `CharacterController`.
1161
1161
 
@@ -1171,7 +1171,8 @@ Token `og.CharacterController`, registered under the schema name `og.CharacterCo
1171
1171
  | `skin` | `number` | `0.02` | ≥ 0.001 | `m` | — | The gap kept between it and every surface. |
1172
1172
  | `coyoteTime` | `number` | `0.1` | ≥ 0 | `s` | tunable | After leaving an edge, a jump still starts within this time. |
1173
1173
  | `maxFallSpeed` | `number` | `40` | ≥ 0 | `mps` | tunable | The fastest fall. |
1174
- | `pushBodies` | `boolean` | `true` | — | — | — | Push dynamic bodies it walks into. |
1174
+ | `pushBodies` | `boolean` | `true` | — | — | — | Push dynamic bodies it walks into, with at most `pushStrength`. |
1175
+ | `pushStrength` | `number` | `1000` | ≥ 0 | `newton` | tunable | The most force it pushes with: each tick the bodies it walks into share an impulse of at most this times the tick's length (mass times the speed it asks of them, capped), so a body of a few kilograms is shoved at its speed while one whose friction holds more (a tonne on the ground) does not move. 0 leaves every body where it is, as `pushBodies` false does. |
1175
1176
  | `grounded` | `boolean` | `false` | — | — | read only | Written: standing on walkable ground after the step. |
1176
1177
  | `sliding` | `boolean` | `false` | — | — | read only | Written: sliding down a slope steeper than maxSlope. |
1177
1178
  | `velocity` | `Vector3` | `{ x: 0, y: 0, z: 0 }` | — | `mps` | read only | Written: the velocity it moved at this tick (the platform's carry included). |
@@ -1182,7 +1183,7 @@ Token `og.CharacterController`, registered under the schema name `og.CharacterCo
1182
1183
 
1183
1184
  ```ogt
1184
1185
  component CharacterController {
1185
- doc "A kinematic character (3D, or top-down 2D): the entity's capsule (or any og.Collider) moved by `move` each tick, sliding along walls, climbing slopes up to `maxSlope` and steps up to `stepHeight`, snapped to the ground, carried by the moving platform it stands on and falling by gravity. It keeps `skin` off every surface, standing that far over the ground; a step is climbed when the ground beyond it is at most `stepHeight` over the ground it stands on. What blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider; the step makes it a kinematic body and pushes dynamic bodies it walks into."
1186
+ doc "A kinematic character (3D, or top-down 2D): the entity's capsule (or any og.Collider) moved by `move` each tick, sliding along walls, climbing slopes up to `maxSlope` and steps up to `stepHeight`, snapped to the ground, carried by the moving platform it stands on and falling by gravity. It keeps `skin` off every surface, standing that far over the ground; a step is climbed when the ground beyond it is at most `stepHeight` over the ground it stands on. What blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider; the step makes it a kinematic body and pushes the dynamic bodies it walks into (`pushBodies`) with at most `pushStrength`, so a light one is shoved and a heavy one holds."
1186
1187
  field move Vector3 "The wanted velocity across the ground (m/s, world space; y is ignored unless gravityScale is 0). Set it every tick." {
1187
1188
  unit mps
1188
1189
  }
@@ -1235,9 +1236,15 @@ component CharacterController {
1235
1236
  unit mps
1236
1237
  tunable true
1237
1238
  }
1238
- field pushBodies bool "Push dynamic bodies it walks into." {
1239
+ field pushBodies bool "Push dynamic bodies it walks into, with at most `pushStrength`." {
1239
1240
  default true
1240
1241
  }
1242
+ field pushStrength f32 "The most force it pushes with: each tick the bodies it walks into share an impulse of at most this times the tick's length (mass times the speed it asks of them, capped), so a body of a few kilograms is shoved at its speed while one whose friction holds more (a tonne on the ground) does not move. 0 leaves every body where it is, as `pushBodies` false does." {
1243
+ default 1000
1244
+ min 0
1245
+ unit newton
1246
+ tunable true
1247
+ }
1241
1248
  field grounded bool "Written: standing on walkable ground after the step." {
1242
1249
  readonly true
1243
1250
  }
@@ -1263,13 +1270,13 @@ component CharacterController {
1263
1270
  }
1264
1271
  ```
1265
1272
 
1266
- <sub>`api.ogt` line 3984</sub>
1273
+ <sub>`api.ogt` line 3999</sub>
1267
1274
 
1268
1275
  <a id="record-PlatformerController"></a>
1269
1276
 
1270
1277
  ### `og.PlatformerController` (component)
1271
1278
 
1272
- A 2D platformer character (the 2D profile): run, jump and fall with designer units (jump height and time to apex, not gravity), coyote time, jump buffering, variable jump height (releasing jump while rising cuts the jump), apex hang, air jumps, wall slide and wall jump, one-way platforms (colliders on `oneWayLayers` are solid from above only; hold `down` to drop through), moving platforms (it rides what it stands on) and corner correction (a jump that clips a ceiling corner by less than `cornerCorrection` slides past it). It keeps `skin` off every surface; what blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider (a box or capsule); it becomes a kinematic body.
1279
+ A 2D platformer character (the 2D profile): run, jump and fall with designer units (jump height and time to apex, not gravity), coyote time, jump buffering, variable jump height (releasing jump while rising cuts the jump), apex hang, air jumps, wall slide and wall jump, one-way platforms (colliders on `oneWayLayers` are solid from above only; hold `down` to drop through), moving platforms (it rides what it stands on) and corner correction (a jump that clips a ceiling corner by less than `cornerCorrection` slides past it). It keeps `skin` off every surface; what blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider (a box or capsule); it becomes a kinematic body and pushes the dynamic bodies it runs into (`pushBodies`) with at most `pushStrength`, so a crate's mass tells: a light one is shoved at the run speed, a heavy one holds (set its og.RigidBody `mass`).
1273
1280
 
1274
1281
  Token `og.PlatformerController`, registered under the schema name `og.PlatformerController`; its value type is `PlatformerController`.
1275
1282
 
@@ -1303,6 +1310,8 @@ Token `og.PlatformerController`, registered under the schema name `og.Platformer
1303
1310
  | `maxSlope` | `number` | `50` | 0 … 89 | `deg` | tunable | The steepest slope it runs up. |
1304
1311
  | `snapDistance` | `number` | `0.1` | ≥ 0 | `m` | tunable | How far below it the ground still holds it (slopes, small drops). |
1305
1312
  | `skin` | `number` | `0.01` | ≥ 0.001 | `m` | — | The gap kept between it and every surface. |
1313
+ | `pushBodies` | `boolean` | `true` | — | — | — | Push dynamic bodies it runs into, with at most `pushStrength`. |
1314
+ | `pushStrength` | `number` | `1000` | ≥ 0 | `newton` | tunable | The most force it pushes with: each tick the bodies it runs into share an impulse of at most this times the tick's length (mass times the speed it asks of them, capped), so a body of a few kilograms is shoved at its speed while one whose friction holds more (a tonne on the ground) does not move. 0 leaves every body where it is, as `pushBodies` false does. |
1306
1315
  | `grounded` | `boolean` | `false` | — | — | read only | Written: standing on ground after the step. |
1307
1316
  | `onWall` | `number` | `0` | -1 … 1 | — | read only | Written: -1 sliding on a wall to its left, 1 to its right, 0 none. |
1308
1317
  | `facing` | `number` | `1` | -1 … 1 | — | read only | Written: -1 facing left, 1 right (the last run direction). |
@@ -1318,7 +1327,7 @@ Token `og.PlatformerController`, registered under the schema name `og.Platformer
1318
1327
 
1319
1328
  ```ogt
1320
1329
  component PlatformerController {
1321
- doc "A 2D platformer character (the 2D profile): run, jump and fall with designer units (jump height and time to apex, not gravity), coyote time, jump buffering, variable jump height (releasing jump while rising cuts the jump), apex hang, air jumps, wall slide and wall jump, one-way platforms (colliders on `oneWayLayers` are solid from above only; hold `down` to drop through), moving platforms (it rides what it stands on) and corner correction (a jump that clips a ceiling corner by less than `cornerCorrection` slides past it). It keeps `skin` off every surface; what blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider (a box or capsule); it becomes a kinematic body."
1330
+ doc "A 2D platformer character (the 2D profile): run, jump and fall with designer units (jump height and time to apex, not gravity), coyote time, jump buffering, variable jump height (releasing jump while rising cuts the jump), apex hang, air jumps, wall slide and wall jump, one-way platforms (colliders on `oneWayLayers` are solid from above only; hold `down` to drop through), moving platforms (it rides what it stands on) and corner correction (a jump that clips a ceiling corner by less than `cornerCorrection` slides past it). It keeps `skin` off every surface; what blocks it is every solid collider its og.Collider's `layers` and `mask` interact with (each one's layers meeting the other's mask), as for bodies. The entity needs an og.Transform and an og.Collider (a box or capsule); it becomes a kinematic body and pushes the dynamic bodies it runs into (`pushBodies`) with at most `pushStrength`, so a crate's mass tells: a light one is shoved at the run speed, a heavy one holds (set its og.RigidBody `mass`)."
1322
1331
  field moveX f32 "The run input, -1 (left) to 1 (right). Set it every tick." {
1323
1332
  min -1
1324
1333
  max 1
@@ -1459,6 +1468,15 @@ component PlatformerController {
1459
1468
  min 0.001
1460
1469
  unit m
1461
1470
  }
1471
+ field pushBodies bool "Push dynamic bodies it runs into, with at most `pushStrength`." {
1472
+ default true
1473
+ }
1474
+ field pushStrength f32 "The most force it pushes with: each tick the bodies it runs into share an impulse of at most this times the tick's length (mass times the speed it asks of them, capped), so a body of a few kilograms is shoved at its speed while one whose friction holds more (a tonne on the ground) does not move. 0 leaves every body where it is, as `pushBodies` false does." {
1475
+ default 1000
1476
+ min 0
1477
+ unit newton
1478
+ tunable true
1479
+ }
1462
1480
  field grounded bool "Written: standing on ground after the step." {
1463
1481
  readonly true
1464
1482
  }
@@ -1504,13 +1522,13 @@ component PlatformerController {
1504
1522
  }
1505
1523
  ```
1506
1524
 
1507
- <sub>`api.ogt` line 4065</sub>
1525
+ <sub>`api.ogt` line 4086</sub>
1508
1526
 
1509
1527
  <a id="record-CharacterEvent"></a>
1510
1528
 
1511
1529
  ### `og.CharacterEvent` (event)
1512
1530
 
1513
- Something a CharacterController or PlatformerController did this step: the hooks for dust, squash, sounds and camera kicks. Read the next tick.
1531
+ Something a CharacterController or PlatformerController did this step: the hooks for dust, squash, sounds and camera kicks. Read the next tick: the controllers move in the physics step, after the game's systems, so a jump pressed in tick T moves the character in T and its CHARACTER_JUMPED is read in T + 1 (og-feel §12 has the same-tick alternative).
1514
1532
 
1515
1533
  Token `og.CharacterEvent`, registered under the schema name `og.CharacterEvent`; its value type is `CharacterEvent`.
1516
1534
 
@@ -1522,7 +1540,7 @@ Token `og.CharacterEvent`, registered under the schema name `og.CharacterEvent`;
1522
1540
 
1523
1541
  ```ogt
1524
1542
  event CharacterEvent {
1525
- doc "Something a CharacterController or PlatformerController did this step: the hooks for dust, squash, sounds and camera kicks. Read the next tick."
1543
+ doc "Something a CharacterController or PlatformerController did this step: the hooks for dust, squash, sounds and camera kicks. Read the next tick: the controllers move in the physics step, after the game's systems, so a jump pressed in tick T moves the character in T and its CHARACTER_JUMPED is read in T + 1 (og-feel §12 has the same-tick alternative)."
1526
1544
  field entity Entity "The character."
1527
1545
  field kind u32 "CHARACTER_JUMPED 1, LANDED 2, WALL_JUMPED 3, AIR_JUMPED 4, LEFT_GROUND 5, BUMPED 6." {
1528
1546
  min 0
@@ -1534,7 +1552,7 @@ event CharacterEvent {
1534
1552
  }
1535
1553
  ```
1536
1554
 
1537
- <sub>`api.ogt` line 4258</sub>
1555
+ <sub>`api.ogt` line 4288</sub>
1538
1556
 
1539
1557
  <a id="record-Vehicle"></a>
1540
1558
 
@@ -1693,7 +1711,7 @@ component Vehicle {
1693
1711
  }
1694
1712
  ```
1695
1713
 
1696
- <sub>`api.ogt` line 4274</sub>
1714
+ <sub>`api.ogt` line 4304</sub>
1697
1715
 
1698
1716
  <a id="record-Rope"></a>
1699
1717
 
@@ -1782,7 +1800,7 @@ component Rope {
1782
1800
  }
1783
1801
  ```
1784
1802
 
1785
- <sub>`api.ogt` line 4392</sub>
1803
+ <sub>`api.ogt` line 4422</sub>
1786
1804
 
1787
1805
  <a id="record-Cloth"></a>
1788
1806
 
@@ -1888,7 +1906,7 @@ component Cloth {
1888
1906
  }
1889
1907
  ```
1890
1908
 
1891
- <sub>`api.ogt` line 4458</sub>
1909
+ <sub>`api.ogt` line 4488</sub>
1892
1910
 
1893
1911
  <a id="record-Fluid2D"></a>
1894
1912
 
@@ -2012,7 +2030,7 @@ component Fluid2D {
2012
2030
  }
2013
2031
  ```
2014
2032
 
2015
- <sub>`api.ogt` line 4534</sub>
2033
+ <sub>`api.ogt` line 4564</sub>
2016
2034
 
2017
2035
  <a id="record-Fluid3D"></a>
2018
2036
 
@@ -2181,7 +2199,7 @@ component Fluid3D {
2181
2199
  }
2182
2200
  ```
2183
2201
 
2184
- <sub>`api.ogt` line 4623</sub>
2202
+ <sub>`api.ogt` line 4653</sub>
2185
2203
 
2186
2204
  <a id="record-WaterSurface"></a>
2187
2205
 
@@ -2246,7 +2264,7 @@ component WaterSurface {
2246
2264
  }
2247
2265
  ```
2248
2266
 
2249
- <sub>`api.ogt` line 4749</sub>
2267
+ <sub>`api.ogt` line 4779</sub>
2250
2268
 
2251
2269
  <a id="record-WaterLine"></a>
2252
2270
 
@@ -2323,7 +2341,7 @@ component WaterLine {
2323
2341
  }
2324
2342
  ```
2325
2343
 
2326
- <sub>`api.ogt` line 4792</sub>
2344
+ <sub>`api.ogt` line 4822</sub>
2327
2345
 
2328
2346
  <a id="record-Splash"></a>
2329
2347
 
@@ -2354,7 +2372,7 @@ event Splash {
2354
2372
  }
2355
2373
  ```
2356
2374
 
2357
- <sub>`api.ogt` line 4845</sub>
2375
+ <sub>`api.ogt` line 4875</sub>
2358
2376
 
2359
2377
  <a id="record-Ragdoll"></a>
2360
2378
 
@@ -2422,7 +2440,7 @@ component Ragdoll {
2422
2440
  }
2423
2441
  ```
2424
2442
 
2425
- <sub>`api.ogt` line 4857</sub>
2443
+ <sub>`api.ogt` line 4887</sub>
2426
2444
 
2427
2445
  ## Types
2428
2446
 
@@ -2450,7 +2468,7 @@ struct QueryFilter {
2450
2468
  }
2451
2469
  ```
2452
2470
 
2453
- <sub>`api.ogt` line 4902</sub>
2471
+ <sub>`api.ogt` line 4932</sub>
2454
2472
 
2455
2473
  <a id="type-RaycastDesc"></a>
2456
2474
 
@@ -2485,7 +2503,7 @@ struct RaycastDesc {
2485
2503
  }
2486
2504
  ```
2487
2505
 
2488
- <sub>`api.ogt` line 4910</sub>
2506
+ <sub>`api.ogt` line 4940</sub>
2489
2507
 
2490
2508
  <a id="type-RaycastHit"></a>
2491
2509
 
@@ -2512,7 +2530,7 @@ struct RaycastHit {
2512
2530
  }
2513
2531
  ```
2514
2532
 
2515
- <sub>`api.ogt` line 4926</sub>
2533
+ <sub>`api.ogt` line 4956</sub>
2516
2534
 
2517
2535
  <a id="type-ShapeDesc"></a>
2518
2536
 
@@ -2554,7 +2572,7 @@ struct ShapeDesc {
2554
2572
  }
2555
2573
  ```
2556
2574
 
2557
- <sub>`api.ogt` line 4936</sub>
2575
+ <sub>`api.ogt` line 4966</sub>
2558
2576
 
2559
2577
  <a id="type-ShapeCastDesc"></a>
2560
2578
 
@@ -2593,7 +2611,7 @@ struct ShapeCastDesc {
2593
2611
  }
2594
2612
  ```
2595
2613
 
2596
- <sub>`api.ogt` line 4958</sub>
2614
+ <sub>`api.ogt` line 4988</sub>
2597
2615
 
2598
2616
  <a id="type-ShapeCastHit"></a>
2599
2617
 
@@ -2620,7 +2638,7 @@ struct ShapeCastHit {
2620
2638
  }
2621
2639
  ```
2622
2640
 
2623
- <sub>`api.ogt` line 4976</sub>
2641
+ <sub>`api.ogt` line 5006</sub>
2624
2642
 
2625
2643
  <a id="type-OverlapDesc"></a>
2626
2644
 
@@ -2650,7 +2668,7 @@ struct OverlapDesc {
2650
2668
  }
2651
2669
  ```
2652
2670
 
2653
- <sub>`api.ogt` line 4986</sub>
2671
+ <sub>`api.ogt` line 5016</sub>
2654
2672
 
2655
2673
  <a id="type-MeshDesc"></a>
2656
2674
 
@@ -2674,7 +2692,7 @@ struct MeshDesc {
2674
2692
  }
2675
2693
  ```
2676
2694
 
2677
- <sub>`api.ogt` line 4997</sub>
2695
+ <sub>`api.ogt` line 5027</sub>
2678
2696
 
2679
2697
  <a id="type-WheelPose"></a>
2680
2698
 
@@ -2708,7 +2726,7 @@ struct WheelPose {
2708
2726
  }
2709
2727
  ```
2710
2728
 
2711
- <sub>`api.ogt` line 5071</sub>
2729
+ <sub>`api.ogt` line 5101</sub>
2712
2730
 
2713
2731
  <a id="type-RagdollBoneDesc"></a>
2714
2732
 
@@ -2751,7 +2769,7 @@ struct RagdollBoneDesc {
2751
2769
  }
2752
2770
  ```
2753
2771
 
2754
- <sub>`api.ogt` line 5087</sub>
2772
+ <sub>`api.ogt` line 5117</sub>
2755
2773
 
2756
2774
  <a id="type-RagdollRigDesc"></a>
2757
2775
 
@@ -2775,7 +2793,7 @@ struct RagdollRigDesc {
2775
2793
  }
2776
2794
  ```
2777
2795
 
2778
- <sub>`api.ogt` line 5109</sub>
2796
+ <sub>`api.ogt` line 5139</sub>
2779
2797
 
2780
2798
  <a id="type-BonePose"></a>
2781
2799
 
@@ -2798,7 +2816,7 @@ struct BonePose {
2798
2816
  }
2799
2817
  ```
2800
2818
 
2801
- <sub>`api.ogt` line 5116</sub>
2819
+ <sub>`api.ogt` line 5146</sub>
2802
2820
 
2803
2821
  <a id="type-PhysicsPhase"></a>
2804
2822
 
@@ -2823,7 +2841,7 @@ struct PhysicsPhase {
2823
2841
  }
2824
2842
  ```
2825
2843
 
2826
- <sub>`api.ogt` line 5190</sub>
2844
+ <sub>`api.ogt` line 5220</sub>
2827
2845
 
2828
2846
  <a id="type-PhysicsStats"></a>
2829
2847
 
@@ -2854,7 +2872,7 @@ struct PhysicsStats {
2854
2872
  }
2855
2873
  ```
2856
2874
 
2857
- <sub>`api.ogt` line 5199</sub>
2875
+ <sub>`api.ogt` line 5229</sub>
2858
2876
 
2859
2877
  ## Constants
2860
2878
 
@@ -2905,238 +2923,238 @@ struct PhysicsStats {
2905
2923
  const BODY_DYNAMIC u32 0 "RigidBody.kind: moved by the solver; its Transform and Velocity are written back every tick."
2906
2924
  ```
2907
2925
 
2908
- <sub>`api.ogt` line 3702</sub>
2926
+ <sub>`api.ogt` line 3717</sub>
2909
2927
 
2910
2928
  ```ogt
2911
2929
  const BODY_STATIC u32 1 "RigidBody.kind: never moves; collides with dynamic bodies."
2912
2930
  ```
2913
2931
 
2914
- <sub>`api.ogt` line 3703</sub>
2932
+ <sub>`api.ogt` line 3718</sub>
2915
2933
 
2916
2934
  ```ogt
2917
2935
  const BODY_KINEMATIC u32 2 "RigidBody.kind: not moved by the solver. With an og.Velocity the step moves it by it each tick and writes its Transform back (a lift, a conveyor, a turning gear); a Transform game code writes moves it there first (a teleport). Without one it stays where its Transform puts it. Either way it pushes dynamic bodies and carries the controllers standing on it."
2918
2936
  ```
2919
2937
 
2920
- <sub>`api.ogt` line 3704</sub>
2938
+ <sub>`api.ogt` line 3719</sub>
2921
2939
 
2922
2940
  ```ogt
2923
2941
  const LOCK_TRANSLATION_X u32 1 "RigidBody.lock bit: no translation along x."
2924
2942
  ```
2925
2943
 
2926
- <sub>`api.ogt` line 3705</sub>
2944
+ <sub>`api.ogt` line 3720</sub>
2927
2945
 
2928
2946
  ```ogt
2929
2947
  const LOCK_TRANSLATION_Y u32 2 "RigidBody.lock bit: no translation along y."
2930
2948
  ```
2931
2949
 
2932
- <sub>`api.ogt` line 3706</sub>
2950
+ <sub>`api.ogt` line 3721</sub>
2933
2951
 
2934
2952
  ```ogt
2935
2953
  const LOCK_TRANSLATION_Z u32 4 "RigidBody.lock bit: no translation along z."
2936
2954
  ```
2937
2955
 
2938
- <sub>`api.ogt` line 3707</sub>
2956
+ <sub>`api.ogt` line 3722</sub>
2939
2957
 
2940
2958
  ```ogt
2941
2959
  const LOCK_ROTATION_X u32 8 "RigidBody.lock bit: no rotation about x."
2942
2960
  ```
2943
2961
 
2944
- <sub>`api.ogt` line 3708</sub>
2962
+ <sub>`api.ogt` line 3723</sub>
2945
2963
 
2946
2964
  ```ogt
2947
2965
  const LOCK_ROTATION_Y u32 16 "RigidBody.lock bit: no rotation about y."
2948
2966
  ```
2949
2967
 
2950
- <sub>`api.ogt` line 3709</sub>
2968
+ <sub>`api.ogt` line 3724</sub>
2951
2969
 
2952
2970
  ```ogt
2953
2971
  const LOCK_ROTATION_Z u32 32 "RigidBody.lock bit: no rotation about z (the 2D profile's only rotation)."
2954
2972
  ```
2955
2973
 
2956
- <sub>`api.ogt` line 3710</sub>
2974
+ <sub>`api.ogt` line 3725</sub>
2957
2975
 
2958
2976
  ```ogt
2959
2977
  const SHAPE_BOX u32 0 "Collider.shape: a box of `size` (both profiles)."
2960
2978
  ```
2961
2979
 
2962
- <sub>`api.ogt` line 3711</sub>
2980
+ <sub>`api.ogt` line 3726</sub>
2963
2981
 
2964
2982
  ```ogt
2965
2983
  const SHAPE_SPHERE u32 1 "Collider.shape: a sphere of `radius` (a circle in 2D)."
2966
2984
  ```
2967
2985
 
2968
- <sub>`api.ogt` line 3712</sub>
2986
+ <sub>`api.ogt` line 3727</sub>
2969
2987
 
2970
2988
  ```ogt
2971
2989
  const SHAPE_CAPSULE u32 2 "Collider.shape: a capsule along y of `radius`, with `height` between the cap centres (both profiles)."
2972
2990
  ```
2973
2991
 
2974
- <sub>`api.ogt` line 3713</sub>
2992
+ <sub>`api.ogt` line 3728</sub>
2975
2993
 
2976
2994
  ```ogt
2977
2995
  const SHAPE_CYLINDER u32 3 "Collider.shape: a cylinder along y of `radius` and `height` (3D only)."
2978
2996
  ```
2979
2997
 
2980
- <sub>`api.ogt` line 3714</sub>
2998
+ <sub>`api.ogt` line 3729</sub>
2981
2999
 
2982
3000
  ```ogt
2983
3001
  const SHAPE_CONVEX u32 4 "Collider.shape: the convex hull of the vertices of `mesh` (3D), or of their xy (a convex polygon, 2D)."
2984
3002
  ```
2985
3003
 
2986
- <sub>`api.ogt` line 3715</sub>
3004
+ <sub>`api.ogt` line 3730</sub>
2987
3005
 
2988
3006
  ```ogt
2989
3007
  const SHAPE_TRIMESH u32 5 "Collider.shape: the triangles of `mesh` (3D only; for static and kinematic bodies)."
2990
3008
  ```
2991
3009
 
2992
- <sub>`api.ogt` line 3716</sub>
3010
+ <sub>`api.ogt` line 3731</sub>
2993
3011
 
2994
3012
  ```ogt
2995
3013
  const SHAPE_HEIGHTFIELD u32 6 "Collider.shape: the height field registered as `mesh`, centred on the entity (3D only; a terrain: og.terrain.load's TerrainInfo.geometry)."
2996
3014
  ```
2997
3015
 
2998
- <sub>`api.ogt` line 3717</sub>
3016
+ <sub>`api.ogt` line 3732</sub>
2999
3017
 
3000
3018
  ```ogt
3001
3019
  const PROFILE_2D u32 2 "Physics.profile: rapier2d, bodies in the xy plane rotating about z."
3002
3020
  ```
3003
3021
 
3004
- <sub>`api.ogt` line 3718</sub>
3022
+ <sub>`api.ogt` line 3733</sub>
3005
3023
 
3006
3024
  ```ogt
3007
3025
  const PROFILE_3D u32 3 "Physics.profile: rapier3d."
3008
3026
  ```
3009
3027
 
3010
- <sub>`api.ogt` line 3719</sub>
3028
+ <sub>`api.ogt` line 3734</sub>
3011
3029
 
3012
3030
  ```ogt
3013
3031
  const JOINT_FIXED u32 0 "`Joint.kind`: the two bodies move as one."
3014
3032
  ```
3015
3033
 
3016
- <sub>`api.ogt` line 3904</sub>
3034
+ <sub>`api.ogt` line 3919</sub>
3017
3035
 
3018
3036
  ```ogt
3019
3037
  const JOINT_REVOLUTE u32 1 "`Joint.kind`: a hinge about `axis` (2D: about z), with optional limits and a motor."
3020
3038
  ```
3021
3039
 
3022
- <sub>`api.ogt` line 3905</sub>
3040
+ <sub>`api.ogt` line 3920</sub>
3023
3041
 
3024
3042
  ```ogt
3025
3043
  const JOINT_PRISMATIC u32 2 "`Joint.kind`: a slider along `axis`, with optional limits and a motor."
3026
3044
  ```
3027
3045
 
3028
- <sub>`api.ogt` line 3906</sub>
3046
+ <sub>`api.ogt` line 3921</sub>
3029
3047
 
3030
3048
  ```ogt
3031
3049
  const JOINT_SPRING u32 3 "`Joint.kind`: a damped spring pulling the anchors to `restLength` apart."
3032
3050
  ```
3033
3051
 
3034
- <sub>`api.ogt` line 3907</sub>
3052
+ <sub>`api.ogt` line 3922</sub>
3035
3053
 
3036
3054
  ```ogt
3037
3055
  const JOINT_ROPE u32 4 "`Joint.kind`: a rope: the anchors stay at most `length` apart, free inside it."
3038
3056
  ```
3039
3057
 
3040
- <sub>`api.ogt` line 3908</sub>
3058
+ <sub>`api.ogt` line 3923</sub>
3041
3059
 
3042
3060
  ```ogt
3043
3061
  const JOINT_BALL u32 5 "`Joint.kind`: a ball and socket (3D; the 2D profile treats it as a hinge)."
3044
3062
  ```
3045
3063
 
3046
- <sub>`api.ogt` line 3909</sub>
3064
+ <sub>`api.ogt` line 3924</sub>
3047
3065
 
3048
3066
  ```ogt
3049
3067
  const MOTOR_NONE u32 0 "`Joint.motor`: no motor."
3050
3068
  ```
3051
3069
 
3052
- <sub>`api.ogt` line 3910</sub>
3070
+ <sub>`api.ogt` line 3925</sub>
3053
3071
 
3054
3072
  ```ogt
3055
3073
  const MOTOR_VELOCITY u32 1 "`Joint.motor`: drive towards `motorTarget` speed (rad/s or m/s)."
3056
3074
  ```
3057
3075
 
3058
- <sub>`api.ogt` line 3911</sub>
3076
+ <sub>`api.ogt` line 3926</sub>
3059
3077
 
3060
3078
  ```ogt
3061
3079
  const MOTOR_POSITION u32 2 "`Joint.motor`: spring towards `motorTarget` angle or position (a servo)."
3062
3080
  ```
3063
3081
 
3064
- <sub>`api.ogt` line 3912</sub>
3082
+ <sub>`api.ogt` line 3927</sub>
3065
3083
 
3066
3084
  ```ogt
3067
3085
  const CHARACTER_JUMPED u32 1 "`CharacterEvent.kind`: a jump from the ground (or in coyote time)."
3068
3086
  ```
3069
3087
 
3070
- <sub>`api.ogt` line 4251</sub>
3088
+ <sub>`api.ogt` line 4281</sub>
3071
3089
 
3072
3090
  ```ogt
3073
3091
  const CHARACTER_LANDED u32 2 "`CharacterEvent.kind`: touched the ground after being in the air."
3074
3092
  ```
3075
3093
 
3076
- <sub>`api.ogt` line 4252</sub>
3094
+ <sub>`api.ogt` line 4282</sub>
3077
3095
 
3078
3096
  ```ogt
3079
3097
  const CHARACTER_WALL_JUMPED u32 3 "`CharacterEvent.kind`: a jump off a wall."
3080
3098
  ```
3081
3099
 
3082
- <sub>`api.ogt` line 4253</sub>
3100
+ <sub>`api.ogt` line 4283</sub>
3083
3101
 
3084
3102
  ```ogt
3085
3103
  const CHARACTER_AIR_JUMPED u32 4 "`CharacterEvent.kind`: a jump in the air (PlatformerController.airJumps)."
3086
3104
  ```
3087
3105
 
3088
- <sub>`api.ogt` line 4254</sub>
3106
+ <sub>`api.ogt` line 4284</sub>
3089
3107
 
3090
3108
  ```ogt
3091
3109
  const CHARACTER_LEFT_GROUND u32 5 "`CharacterEvent.kind`: left the ground without jumping (ran off an edge)."
3092
3110
  ```
3093
3111
 
3094
- <sub>`api.ogt` line 4255</sub>
3112
+ <sub>`api.ogt` line 4285</sub>
3095
3113
 
3096
3114
  ```ogt
3097
3115
  const CHARACTER_BUMPED u32 6 "`CharacterEvent.kind`: hit a ceiling while rising."
3098
3116
  ```
3099
3117
 
3100
- <sub>`api.ogt` line 4256</sub>
3118
+ <sub>`api.ogt` line 4286</sub>
3101
3119
 
3102
3120
  ```ogt
3103
3121
  const DRIVE_REAR u32 0 "`Vehicle.drive`: the rear wheels drive."
3104
3122
  ```
3105
3123
 
3106
- <sub>`api.ogt` line 4270</sub>
3124
+ <sub>`api.ogt` line 4300</sub>
3107
3125
 
3108
3126
  ```ogt
3109
3127
  const DRIVE_FRONT u32 1 "`Vehicle.drive`: the front wheels drive."
3110
3128
  ```
3111
3129
 
3112
- <sub>`api.ogt` line 4271</sub>
3130
+ <sub>`api.ogt` line 4301</sub>
3113
3131
 
3114
3132
  ```ogt
3115
3133
  const DRIVE_ALL u32 2 "`Vehicle.drive`: every wheel drives."
3116
3134
  ```
3117
3135
 
3118
- <sub>`api.ogt` line 4272</sub>
3136
+ <sub>`api.ogt` line 4302</sub>
3119
3137
 
3120
3138
  ```ogt
3121
3139
  const PIN_TOP u32 1 "`Cloth.pins` bit: the whole top row is pinned."
3122
3140
  ```
3123
3141
 
3124
- <sub>`api.ogt` line 4453</sub>
3142
+ <sub>`api.ogt` line 4483</sub>
3125
3143
 
3126
3144
  ```ogt
3127
3145
  const PIN_TOP_CORNERS u32 2 "`Cloth.pins` bit: the top-left and top-right corners are pinned."
3128
3146
  ```
3129
3147
 
3130
- <sub>`api.ogt` line 4454</sub>
3148
+ <sub>`api.ogt` line 4484</sub>
3131
3149
 
3132
3150
  ```ogt
3133
3151
  const PIN_LEFT u32 4 "`Cloth.pins` bit: the whole left column is pinned (a flag on a pole)."
3134
3152
  ```
3135
3153
 
3136
- <sub>`api.ogt` line 4455</sub>
3154
+ <sub>`api.ogt` line 4485</sub>
3137
3155
 
3138
3156
  ```ogt
3139
3157
  const PIN_TOP_RINGS u32 8 "`Cloth.pins` bit: every fourth point of the top row (curtain rings)."
3140
3158
  ```
3141
3159
 
3142
- <sub>`api.ogt` line 4456</sub>
3160
+ <sub>`api.ogt` line 4486</sub>