@woosh/meep-engine 2.145.0 → 2.147.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.
- package/package.json +1 -1
- package/src/core/geom/3d/shape/HeightMapShape3D.d.ts +33 -3
- package/src/core/geom/3d/shape/HeightMapShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/HeightMapShape3D.js +486 -451
- package/src/engine/control/first-person/DESIGN_COLLISION.md +365 -352
- package/src/engine/control/first-person/FirstPersonPlayerController.d.ts +1 -14
- package/src/engine/control/first-person/FirstPersonPlayerController.d.ts.map +1 -1
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts +20 -8
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.d.ts.map +1 -1
- package/src/engine/control/first-person/FirstPersonPlayerControllerConfig.js +552 -546
- package/src/engine/control/first-person/TODO.md +13 -11
- package/src/engine/control/first-person/abilities/LedgeGrab.d.ts +8 -3
- package/src/engine/control/first-person/abilities/LedgeGrab.d.ts.map +1 -1
- package/src/engine/control/first-person/abilities/LedgeGrab.js +213 -199
- package/src/engine/control/first-person/abilities/Mantle.d.ts.map +1 -1
- package/src/engine/control/first-person/abilities/Mantle.js +195 -188
- package/src/engine/control/first-person/abilities/WallJump.d.ts.map +1 -1
- package/src/engine/control/first-person/abilities/WallJump.js +11 -3
- package/src/engine/control/first-person/abilities/WallRun.d.ts.map +1 -1
- package/src/engine/control/first-person/abilities/WallRun.js +183 -163
- package/src/engine/control/first-person/collision/KinematicMover.d.ts.map +1 -1
- package/src/engine/control/first-person/collision/KinematicMover.js +634 -592
- package/src/engine/control/first-person/prototype_first_person_controller.js +1003 -901
- package/src/engine/control/first-person/sensors/FirstPersonSensors.d.ts +9 -0
- package/src/engine/control/first-person/sensors/FirstPersonSensors.d.ts.map +1 -1
- package/src/engine/control/first-person/sensors/FirstPersonSensors.js +87 -77
- package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.d.ts +8 -0
- package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.d.ts.map +1 -1
- package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.js +229 -196
- package/src/engine/ecs/EntityManager.d.ts +34 -11
- package/src/engine/ecs/EntityManager.d.ts.map +1 -1
- package/src/engine/ecs/EntityManager.js +71 -42
- package/src/engine/interpolation/BinaryInterpolationAdapter.d.ts.map +1 -0
- package/src/engine/interpolation/Interpoland.d.ts +48 -0
- package/src/engine/interpolation/Interpoland.d.ts.map +1 -0
- package/src/engine/interpolation/Interpoland.js +49 -0
- package/src/engine/interpolation/Interpolated.d.ts +101 -0
- package/src/engine/interpolation/Interpolated.d.ts.map +1 -0
- package/src/engine/interpolation/Interpolated.js +149 -0
- package/src/engine/{network/sim → interpolation}/InterpolationLog.d.ts +1 -1
- package/src/engine/interpolation/InterpolationLog.d.ts.map +1 -0
- package/src/engine/{network/sim → interpolation}/InterpolationLog.js +2 -2
- package/src/engine/interpolation/InterpolationSystem.d.ts +116 -0
- package/src/engine/interpolation/InterpolationSystem.d.ts.map +1 -0
- package/src/engine/interpolation/InterpolationSystem.js +233 -0
- package/src/engine/interpolation/PoseInterpolationAdapter.d.ts +17 -0
- package/src/engine/interpolation/PoseInterpolationAdapter.d.ts.map +1 -0
- package/src/engine/interpolation/PoseInterpolationAdapter.js +61 -0
- package/src/engine/interpolation/TransformPoseSerializationAdapter.d.ts +35 -0
- package/src/engine/interpolation/TransformPoseSerializationAdapter.d.ts.map +1 -0
- package/src/engine/interpolation/TransformPoseSerializationAdapter.js +57 -0
- package/src/engine/interpolation/pose_interpoland.d.ts +18 -0
- package/src/engine/interpolation/pose_interpoland.d.ts.map +1 -0
- package/src/engine/interpolation/pose_interpoland.js +27 -0
- package/src/engine/network/NetworkSession.d.ts +2 -2
- package/src/engine/network/NetworkSession.d.ts.map +1 -1
- package/src/engine/network/NetworkSession.js +2 -2
- package/src/engine/network/adapters/QuaternionInterpolationAdapter.d.ts +1 -1
- package/src/engine/network/adapters/QuaternionInterpolationAdapter.d.ts.map +1 -1
- package/src/engine/network/adapters/QuaternionInterpolationAdapter.js +1 -1
- package/src/engine/network/adapters/TransformInterpolationAdapter.d.ts +1 -1
- package/src/engine/network/adapters/TransformInterpolationAdapter.d.ts.map +1 -1
- package/src/engine/network/adapters/TransformInterpolationAdapter.js +1 -1
- package/src/engine/network/adapters/Vector3InterpolationAdapter.d.ts +1 -1
- package/src/engine/network/adapters/Vector3InterpolationAdapter.d.ts.map +1 -1
- package/src/engine/network/adapters/Vector3InterpolationAdapter.js +1 -1
- package/src/engine/physics/INTEPOLATION_SYSTEM_PLAN.md +287 -0
- package/src/engine/physics/PLAN.md +944 -809
- package/src/engine/physics/body/BodyStorage.d.ts +9 -0
- package/src/engine/physics/body/BodyStorage.d.ts.map +1 -1
- package/src/engine/physics/body/BodyStorage.js +23 -0
- package/src/engine/physics/broadphase/generate_pairs.d.ts.map +1 -1
- package/src/engine/physics/broadphase/generate_pairs.js +7 -0
- package/src/engine/physics/ccd/linear_sweep.d.ts +97 -0
- package/src/engine/physics/ccd/linear_sweep.d.ts.map +1 -0
- package/src/engine/physics/ccd/linear_sweep.js +238 -0
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +82 -3
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +227 -8
- package/src/engine/physics/ecs/RigidBodyFlags.d.ts +6 -0
- package/src/engine/physics/ecs/RigidBodyFlags.d.ts.map +1 -1
- package/src/engine/physics/ecs/RigidBodyFlags.js +6 -0
- package/src/engine/physics/narrowphase/box_triangle_contact.js +814 -811
- package/src/engine/physics/narrowphase/compute_penetration.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/compute_penetration.js +325 -323
- package/src/engine/physics/narrowphase/decomposition/heightmap_enumerate_triangles.d.ts +27 -8
- package/src/engine/physics/narrowphase/decomposition/heightmap_enumerate_triangles.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/decomposition/heightmap_enumerate_triangles.js +235 -204
- package/src/engine/physics/narrowphase/narrowphase_step.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/narrowphase_step.js +97 -13
- package/src/engine/physics/queries/overlap_shape.d.ts.map +1 -1
- package/src/engine/physics/queries/overlap_shape.js +185 -183
- package/src/engine/simulation/Ticker.d.ts +14 -0
- package/src/engine/simulation/Ticker.d.ts.map +1 -1
- package/src/engine/simulation/Ticker.js +136 -1
- package/src/engine/network/sim/BinaryInterpolationAdapter.d.ts.map +0 -1
- package/src/engine/network/sim/InterpolationLog.d.ts.map +0 -1
- /package/src/engine/{network/sim → interpolation}/BinaryInterpolationAdapter.d.ts +0 -0
- /package/src/engine/{network/sim → interpolation}/BinaryInterpolationAdapter.js +0 -0
|
@@ -1,163 +1,183 @@
|
|
|
1
|
-
import { DEG_TO_RAD } from "../../../../core/math/DEG_TO_RAD.js";
|
|
2
|
-
import { Ability } from "./Ability.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Wall-run ability. Activates when the player is airborne with momentum
|
|
6
|
-
* and a wall is detected to their left or right. While active:
|
|
7
|
-
*
|
|
8
|
-
* - Gravity is reduced to `cfg.wallRun.gravityFactor × base` (typically
|
|
9
|
-
* 25%), letting the player hang on the wall for longer than a normal
|
|
10
|
-
* jump arc.
|
|
11
|
-
* - Horizontal velocity is projected onto the wall's tangent each tick,
|
|
12
|
-
* so the body sticks to the wall and slides along it. Forward
|
|
13
|
-
* momentum is preserved; into-wall and out-of-wall velocity
|
|
14
|
-
* components are zeroed.
|
|
15
|
-
* - Camera tilts into the wall via the shared lean spring (writes the
|
|
16
|
-
* wall-tilt to `runtime.leanTargetRad` each tick — same channel
|
|
17
|
-
* base writes its lat-accel-derived lean to, so transitions in and
|
|
18
|
-
* out share the spring's smoothing).
|
|
19
|
-
*
|
|
20
|
-
* Exits on:
|
|
21
|
-
* - Timer (`cfg.wallRun.maxDuration`)
|
|
22
|
-
* - Lost wall contact (sensor's hit flag becomes false)
|
|
23
|
-
* - Re-grounded (we walked onto a floor at the wall's end)
|
|
24
|
-
* - Wall-jump preempts (higher priority — WallJump declares priority 60)
|
|
25
|
-
*
|
|
26
|
-
* Priority 50 — above Mantle (30), Slide (10), below Wall-jump (60).
|
|
27
|
-
*
|
|
28
|
-
* @author Alex Goldring
|
|
29
|
-
* @copyright Company Named Limited (c) 2026
|
|
30
|
-
*/
|
|
31
|
-
export class WallRun extends Ability {
|
|
32
|
-
constructor() {
|
|
33
|
-
super();
|
|
34
|
-
this.name = "WallRun";
|
|
35
|
-
this.priority = 50;
|
|
36
|
-
|
|
37
|
-
/** @private Seconds since this ability activated. */
|
|
38
|
-
this._elapsed = 0;
|
|
39
|
-
/** @private "L" or "R" — which wall we're running on. */
|
|
40
|
-
this._side = "L";
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
canActivate(controller, runtime, sensors) {
|
|
44
|
-
const cfg = controller.config.wallRun;
|
|
45
|
-
if (!cfg) return false;
|
|
46
|
-
if (sensors === undefined || sensors === null) return false;
|
|
47
|
-
if (controller.state.grounded) return false;
|
|
48
|
-
if (controller.state.airborneTime < cfg.minAirborneTime) return false;
|
|
49
|
-
|
|
50
|
-
const speed = Math.hypot(runtime.velocityX, runtime.velocityZ);
|
|
51
|
-
if (speed < cfg.minSpeed) return false;
|
|
52
|
-
|
|
53
|
-
// Need a wall on left OR right (not front — that's a wall to bump into).
|
|
54
|
-
if (!sensors.wallLeft.hit && !sensors.wallRight.hit) return false;
|
|
55
|
-
|
|
56
|
-
//
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
//
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
//
|
|
136
|
-
//
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
//
|
|
146
|
-
//
|
|
147
|
-
//
|
|
148
|
-
//
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
1
|
+
import { DEG_TO_RAD } from "../../../../core/math/DEG_TO_RAD.js";
|
|
2
|
+
import { Ability } from "./Ability.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Wall-run ability. Activates when the player is airborne with momentum
|
|
6
|
+
* and a wall is detected to their left or right. While active:
|
|
7
|
+
*
|
|
8
|
+
* - Gravity is reduced to `cfg.wallRun.gravityFactor × base` (typically
|
|
9
|
+
* 25%), letting the player hang on the wall for longer than a normal
|
|
10
|
+
* jump arc.
|
|
11
|
+
* - Horizontal velocity is projected onto the wall's tangent each tick,
|
|
12
|
+
* so the body sticks to the wall and slides along it. Forward
|
|
13
|
+
* momentum is preserved; into-wall and out-of-wall velocity
|
|
14
|
+
* components are zeroed.
|
|
15
|
+
* - Camera tilts into the wall via the shared lean spring (writes the
|
|
16
|
+
* wall-tilt to `runtime.leanTargetRad` each tick — same channel
|
|
17
|
+
* base writes its lat-accel-derived lean to, so transitions in and
|
|
18
|
+
* out share the spring's smoothing).
|
|
19
|
+
*
|
|
20
|
+
* Exits on:
|
|
21
|
+
* - Timer (`cfg.wallRun.maxDuration`)
|
|
22
|
+
* - Lost wall contact (sensor's hit flag becomes false)
|
|
23
|
+
* - Re-grounded (we walked onto a floor at the wall's end)
|
|
24
|
+
* - Wall-jump preempts (higher priority — WallJump declares priority 60)
|
|
25
|
+
*
|
|
26
|
+
* Priority 50 — above Mantle (30), Slide (10), below Wall-jump (60).
|
|
27
|
+
*
|
|
28
|
+
* @author Alex Goldring
|
|
29
|
+
* @copyright Company Named Limited (c) 2026
|
|
30
|
+
*/
|
|
31
|
+
export class WallRun extends Ability {
|
|
32
|
+
constructor() {
|
|
33
|
+
super();
|
|
34
|
+
this.name = "WallRun";
|
|
35
|
+
this.priority = 50;
|
|
36
|
+
|
|
37
|
+
/** @private Seconds since this ability activated. */
|
|
38
|
+
this._elapsed = 0;
|
|
39
|
+
/** @private "L" or "R" — which wall we're running on. */
|
|
40
|
+
this._side = "L";
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
canActivate(controller, runtime, sensors) {
|
|
44
|
+
const cfg = controller.config.wallRun;
|
|
45
|
+
if (!cfg) return false;
|
|
46
|
+
if (sensors === undefined || sensors === null) return false;
|
|
47
|
+
if (controller.state.grounded) return false;
|
|
48
|
+
if (controller.state.airborneTime < cfg.minAirborneTime) return false;
|
|
49
|
+
|
|
50
|
+
const speed = Math.hypot(runtime.velocityX, runtime.velocityZ);
|
|
51
|
+
if (speed < cfg.minSpeed) return false;
|
|
52
|
+
|
|
53
|
+
// Need a wall on left OR right (not front — that's a wall to bump into).
|
|
54
|
+
if (!sensors.wallLeft.hit && !sensors.wallRight.hit) return false;
|
|
55
|
+
|
|
56
|
+
// Don't (re)grab the wall when a grabbable ledge is right ahead: you've
|
|
57
|
+
// reached its top, so ledge-grab/mantle should take over (hang or
|
|
58
|
+
// vault) instead of the run re-attaching and riding you back DOWN the
|
|
59
|
+
// wall you just climbed. Only bites when facing INTO the wall (the
|
|
60
|
+
// forward probe has to hit for a ledge ahead), so a normal run ALONG
|
|
61
|
+
// the wall — facing down its length — is unaffected.
|
|
62
|
+
if (sensors.ledgeAhead.hit) return false;
|
|
63
|
+
|
|
64
|
+
// Forward intent required — wall-run is a committed action.
|
|
65
|
+
if (controller.intent.move.y < 0.1) return false;
|
|
66
|
+
|
|
67
|
+
// Don't (re)grab a wall you're moving AWAY from. The wall normal
|
|
68
|
+
// points off the wall toward the player, so velocity·normal > 0 means
|
|
69
|
+
// leaving it — most importantly right after a wall-JUMP pushed you off
|
|
70
|
+
// (else the run would re-attach next tick and the tangent projection
|
|
71
|
+
// would cancel the kick). Approaching (dot < 0) or running along it
|
|
72
|
+
// (dot ≈ 0) is fine.
|
|
73
|
+
const hit = sensors.wallLeft.hit
|
|
74
|
+
&& (!sensors.wallRight.hit || sensors.wallLeft.distance <= sensors.wallRight.distance)
|
|
75
|
+
? sensors.wallLeft : sensors.wallRight;
|
|
76
|
+
const awaySpeed = runtime.velocityX * hit.normal.x + runtime.velocityZ * hit.normal.z;
|
|
77
|
+
if (awaySpeed > cfg.minSpeed * 0.5) return false;
|
|
78
|
+
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
onActivate(controller, runtime) {
|
|
83
|
+
const sensors = runtime.sensors;
|
|
84
|
+
this._elapsed = 0;
|
|
85
|
+
|
|
86
|
+
// Pick the closer wall if both detected.
|
|
87
|
+
if (sensors.wallLeft.hit
|
|
88
|
+
&& (!sensors.wallRight.hit
|
|
89
|
+
|| sensors.wallLeft.distance <= sensors.wallRight.distance)) {
|
|
90
|
+
this._side = "L";
|
|
91
|
+
} else {
|
|
92
|
+
this._side = "R";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Clear any in-progress jump state — the wall-run takes over the
|
|
96
|
+
// vertical model.
|
|
97
|
+
runtime.midJump = false;
|
|
98
|
+
runtime.apexFired = false;
|
|
99
|
+
controller.state.isVariableJumpCut = false;
|
|
100
|
+
controller.state.isAscending = false;
|
|
101
|
+
|
|
102
|
+
controller.signals.onLeaveGround.send1({ reason: "wallrun" });
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Wall-jump (priority 60) should be allowed to preempt freely; that's
|
|
107
|
+
* the canonical chain (wall-run → wall-jump). Any other higher-priority
|
|
108
|
+
* ability is also fine — wall-run is a transient state.
|
|
109
|
+
*/
|
|
110
|
+
canInterrupt() {
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
tick(controller, runtime, bodyTransform, dt, system) {
|
|
115
|
+
const cfg = controller.config.wallRun;
|
|
116
|
+
this._elapsed += dt;
|
|
117
|
+
|
|
118
|
+
// -- Exit: timer.
|
|
119
|
+
if (this._elapsed >= cfg.maxDuration) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
// -- Exit: re-grounded (we ran onto a floor).
|
|
123
|
+
if (controller.state.grounded) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const sensors = runtime.sensors;
|
|
128
|
+
const sensorHit = this._side === "L" ? sensors.wallLeft : sensors.wallRight;
|
|
129
|
+
|
|
130
|
+
// -- Exit: lost the wall.
|
|
131
|
+
if (!sensorHit.hit) {
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// -- Project velocity onto the wall's tangent.
|
|
136
|
+
// The wall's normal is in the XZ plane (vertical wall). Zero the
|
|
137
|
+
// component of velocity along that normal. Forward momentum
|
|
138
|
+
// (along the wall's tangent direction) is preserved.
|
|
139
|
+
const nx = sensorHit.normal.x;
|
|
140
|
+
const nz = sensorHit.normal.z;
|
|
141
|
+
const dotN = runtime.velocityX * nx + runtime.velocityZ * nz;
|
|
142
|
+
runtime.velocityX -= dotN * nx;
|
|
143
|
+
runtime.velocityZ -= dotN * nz;
|
|
144
|
+
|
|
145
|
+
// -- Camera roll: write directly to the shared lean target.
|
|
146
|
+
// Sign convention: positive engine roll = head tilts RIGHT. Wall
|
|
147
|
+
// on LEFT → tilt LEFT → negative roll. Wall on RIGHT → tilt
|
|
148
|
+
// RIGHT → positive roll. L2.f spring-steps from this value each
|
|
149
|
+
// tick; base will overwrite once the ability releases, and the
|
|
150
|
+
// spring smooths the transition.
|
|
151
|
+
const rollSign = this._side === "L" ? -1 : 1;
|
|
152
|
+
runtime.leanTargetRad = rollSign * cfg.cameraRollDeg * DEG_TO_RAD;
|
|
153
|
+
|
|
154
|
+
// -- Reduced gravity. This is wall-run's OWN vertical model (a
|
|
155
|
+
// fraction of base gravity, no fall multiplier), applied here rather
|
|
156
|
+
// than via the system's standard gravity step.
|
|
157
|
+
runtime.velocityY -= runtime.gravity * cfg.gravityFactor * dt;
|
|
158
|
+
|
|
159
|
+
// -- Resolve the move through the shared motor. With the reduced-
|
|
160
|
+
// gravity velocity set above, route it through the same sweep-and-
|
|
161
|
+
// slide + ground-categorize the base locomotion uses (the mover when
|
|
162
|
+
// physics is present, else the flat-ground fallback). _resolveMotion
|
|
163
|
+
// does NOT re-apply gravity. This replaces a raw `position._add` plus
|
|
164
|
+
// a hand-rolled groundResolver catch: the wall-runner now (a) can't
|
|
165
|
+
// drift INTO geometry (the sweep clips it) nor sail OFF a ledge the
|
|
166
|
+
// mover would have caught, and (b) gets the motor's anti-tunnel
|
|
167
|
+
// ground catch for free — the same reason base no longer free-falls
|
|
168
|
+
// past a floor. The motor sets `state.grounded` and fires land/leave.
|
|
169
|
+
system._resolveMotion(controller, runtime, bodyTransform, dt);
|
|
170
|
+
|
|
171
|
+
// -- Exit: the motor caught a floor at the wall's foot (we ran out
|
|
172
|
+
// onto the ground). Release; base resumes next tick.
|
|
173
|
+
if (controller.state.grounded) {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return true;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// No onDeactivate cleanup needed: on the tick we release, base runs
|
|
181
|
+
// and overwrites runtime.leanTargetRad with the natural value. The
|
|
182
|
+
// lean spring smooths the transition.
|
|
183
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KinematicMover.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/control/first-person/collision/KinematicMover.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;IACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,2BA9BW,OAAO,uCAAuC,EAAE,aAAa,OAC7D,OAAO,wCAAwC,EAAE,sBAAsB;QAKtD,IAAI,GAArB,MAAM;QAEW,kBAAkB,GAAnC,MAAM;QAEW,oBAAoB,GAArC,MAAM;QAEW,aAAa,GAA9B,MAAM;QAIW,UAAU,GAA3B,MAAM;OAuChB;IAxBG,6EAAkC;IAClC,6EAAc;IACd,aAA6D;IAC7D,2BAAmG;IACnG,6BAAyG;IACzG,sBAAsF;IACtF,mBAA6E;IAG7E,WAAsB;IACtB,0BAAqC;IACrC,yBAAsC;IACtC,sBAAkC;IAClC,sBAAoD;IACpD,oBAAgC;IAChC,uBAAmC;IAEnC;;;;;OAKG;IACH,SAFU;QAAC,GAAG,EAAC,OAAO,CAAC;QAAC,QAAQ,EAAC,OAAO,CAAC;QAAC,YAAY,EAAC,OAAO,CAAA;KAAC,CAEmB;IAGtF;;;;;;;;;;;;OAYG;IACH,eATW,OAAO,YACP;QAAC,CAAC,EAAC,MAAM,CAAC;QAAA,CAAC,EAAC,MAAM,CAAC;QAAA,CAAC,EAAC,MAAM,CAAC;QAAA,CAAC,EAAC,MAAM,CAAA;KAAC,SACrC,OAAO,mDAAmD,EAAE,eAAe,YAC3E,OAAO,MACP,MAAM,mBACE,MAAM,YAAW,QAAQ,KAAG,OAAO,GAEzC;QAAC,GAAG,EAAC,OAAO,CAAC;QAAC,QAAQ,EAAC,OAAO,CAAC;QAAC,YAAY,EAAC,OAAO,CAAA;KAAC,
|
|
1
|
+
{"version":3,"file":"KinematicMover.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/control/first-person/collision/KinematicMover.js"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;IACI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,2BA9BW,OAAO,uCAAuC,EAAE,aAAa,OAC7D,OAAO,wCAAwC,EAAE,sBAAsB;QAKtD,IAAI,GAArB,MAAM;QAEW,kBAAkB,GAAnC,MAAM;QAEW,oBAAoB,GAArC,MAAM;QAEW,aAAa,GAA9B,MAAM;QAIW,UAAU,GAA3B,MAAM;OAuChB;IAxBG,6EAAkC;IAClC,6EAAc;IACd,aAA6D;IAC7D,2BAAmG;IACnG,6BAAyG;IACzG,sBAAsF;IACtF,mBAA6E;IAG7E,WAAsB;IACtB,0BAAqC;IACrC,yBAAsC;IACtC,sBAAkC;IAClC,sBAAoD;IACpD,oBAAgC;IAChC,uBAAmC;IAEnC;;;;;OAKG;IACH,SAFU;QAAC,GAAG,EAAC,OAAO,CAAC;QAAC,QAAQ,EAAC,OAAO,CAAC;QAAC,YAAY,EAAC,OAAO,CAAA;KAAC,CAEmB;IAGtF;;;;;;;;;;;;OAYG;IACH,eATW,OAAO,YACP;QAAC,CAAC,EAAC,MAAM,CAAC;QAAA,CAAC,EAAC,MAAM,CAAC;QAAA,CAAC,EAAC,MAAM,CAAC;QAAA,CAAC,EAAC,MAAM,CAAA;KAAC,SACrC,OAAO,mDAAmD,EAAE,eAAe,YAC3E,OAAO,MACP,MAAM,mBACE,MAAM,YAAW,QAAQ,KAAG,OAAO,GAEzC;QAAC,GAAG,EAAC,OAAO,CAAC;QAAC,QAAQ,EAAC,OAAO,CAAC;QAAC,YAAY,EAAC,OAAO,CAAA;KAAC,CA6DjE;IAED;;;;;;;;;;;;;;OAcG;IACH,mBA0FC;IAED;;;;OAIG;IACH,sBAQC;IAED;;;;OAIG;IACH,oBASC;IAED;;;;;;;;;OASG;IACH,iBAwCC;IAED;;;;;;;;OAQG;IACH,eAmIC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,0BA+EC;IAED;;;;;OAKG;IACH,cAKC;CACJ;qBAxnBoB,sCAAsC;oCAIvB,iDAAiD;oBALjE,kCAAkC;yBAG7B,kCAAkC"}
|