@woosh/meep-engine 2.143.0 → 2.145.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/bvh2/bvh3/BVH.d.ts.map +1 -1
- package/src/core/bvh2/bvh3/BVH.js +158 -4
- package/src/core/geom/3d/shape/CylinderShape3D.d.ts +56 -0
- package/src/core/geom/3d/shape/CylinderShape3D.d.ts.map +1 -0
- package/src/core/geom/3d/shape/CylinderShape3D.js +223 -0
- package/src/core/geom/3d/shape/PointShape3D.d.ts +1 -0
- package/src/core/geom/3d/shape/PointShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/PointShape3D.js +11 -0
- package/src/core/geom/3d/shape/SphereShape3D.d.ts +1 -0
- package/src/core/geom/3d/shape/SphereShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/SphereShape3D.js +4 -0
- package/src/core/geom/3d/shape/json/shape_to_type.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/shape_to_type.js +3 -0
- package/src/core/geom/3d/shape/json/type_adapters.d.ts +15 -0
- package/src/core/geom/3d/shape/json/type_adapters.d.ts.map +1 -1
- package/src/core/geom/3d/shape/json/type_adapters.js +16 -0
- package/src/engine/control/first-person/DESIGN_COLLISION.md +314 -217
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts +104 -58
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts.map +1 -1
- package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.js +1828 -1789
- package/src/engine/control/first-person/TODO.md +17 -32
- package/src/engine/control/first-person/abilities/WallRun.d.ts.map +1 -1
- package/src/engine/control/first-person/abilities/WallRun.js +18 -35
- package/src/engine/control/first-person/collision/KinematicMover.d.ts +206 -0
- package/src/engine/control/first-person/collision/KinematicMover.d.ts.map +1 -0
- package/src/engine/control/first-person/collision/KinematicMover.js +592 -0
- package/src/engine/control/first-person/prototype_first_person_controller.js +65 -0
- package/src/engine/graphics/render/buffer/simple-fx/ao/SAOShader.js +18 -9
- package/src/engine/physics/PLAN.md +145 -41
- package/src/engine/physics/contact/ManifoldStore.d.ts +28 -2
- package/src/engine/physics/contact/ManifoldStore.d.ts.map +1 -1
- package/src/engine/physics/contact/ManifoldStore.js +37 -3
- package/src/engine/physics/contact/combine_material.d.ts +30 -0
- package/src/engine/physics/contact/combine_material.d.ts.map +1 -0
- package/src/engine/physics/contact/combine_material.js +35 -0
- package/src/engine/physics/ecs/Collider.d.ts +15 -0
- package/src/engine/physics/ecs/Collider.d.ts.map +1 -1
- package/src/engine/physics/ecs/Collider.js +34 -0
- package/src/engine/physics/ecs/Joint.d.ts +18 -0
- package/src/engine/physics/ecs/Joint.d.ts.map +1 -1
- package/src/engine/physics/ecs/Joint.js +70 -0
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +9 -4
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +9 -4
- package/src/engine/physics/ecs/RigidBody.d.ts +15 -0
- package/src/engine/physics/ecs/RigidBody.d.ts.map +1 -1
- package/src/engine/physics/ecs/RigidBody.js +46 -0
- package/src/engine/physics/narrowphase/compute_penetration.d.ts +41 -41
- package/src/engine/physics/narrowphase/compute_penetration.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/compute_penetration.js +96 -169
- package/src/engine/physics/narrowphase/narrowphase_step.d.ts +52 -0
- package/src/engine/physics/narrowphase/narrowphase_step.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/narrowphase_step.js +130 -3
- package/src/engine/physics/solver/solve_contacts.d.ts.map +1 -1
- package/src/engine/physics/solver/solve_contacts.js +10 -21
|
@@ -88,38 +88,23 @@ evaluator then scales. Two-step change.
|
|
|
88
88
|
|
|
89
89
|
Estimated effort: 1 day (more wiring than the others).
|
|
90
90
|
|
|
91
|
-
##
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
Wiring a vertical sweep into `_integrateVerticalAndResolveGround`
|
|
109
|
-
needs to be coordinated with the SKIN clearance — landing at
|
|
110
|
-
`floor + SKIN` would re-flag the player as airborne by the resolver,
|
|
111
|
-
which would re-apply gravity and bounce. Either drop SKIN on
|
|
112
|
-
floor-normal contacts, or have the resolver use a tolerance instead
|
|
113
|
-
of strict `position.y <= testY`.
|
|
114
|
-
|
|
115
|
-
### Ability motion routing
|
|
116
|
-
Slide and WallRun integrate position manually (slide friction in the
|
|
117
|
-
ability tick; wall-run reduced-gravity integration). Once the slide-
|
|
118
|
-
along-walls work above lands, threading those through `_moveAndSlide`
|
|
119
|
-
would prevent wall-runners from drifting into the wall and sliders
|
|
120
|
-
from penetrating obstacles in their path. The controller-side change
|
|
121
|
-
is a few lines per ability; the gating issue is having a usable
|
|
122
|
-
surface normal.
|
|
91
|
+
## Collision (KinematicMover) follow-ups
|
|
92
|
+
|
|
93
|
+
The legacy `_moveAndSlide` + scalar-resolver regime was replaced by the
|
|
94
|
+
`collision/KinematicMover` rebuild (Phases 1–4; see DESIGN_COLLISION.md).
|
|
95
|
+
Slide-along-walls (axis + oblique), vertical anti-tunnel (floors and
|
|
96
|
+
ceilings), depenetration, slopes, stick-to-ground, and stairs all landed
|
|
97
|
+
there. Remaining:
|
|
98
|
+
|
|
99
|
+
### Route WallRun through the mover
|
|
100
|
+
Slide already routes its motion through the mover (it calls
|
|
101
|
+
`_integrateVerticalAndResolveGround` → `_moveViaMover`). **WallRun still
|
|
102
|
+
self-integrates** its reduced-gravity model and so doesn't get
|
|
103
|
+
sweep-and-slide — a wall-runner can still drift into / off geometry the
|
|
104
|
+
mover would have resolved. Thread WallRun's per-tick motion through
|
|
105
|
+
`mover.move()` (keeping its reduced-gravity as the vertical input). The
|
|
106
|
+
gating issue (a usable surface normal) is solved now — `result.groundNormal`
|
|
107
|
+
and the narrowphase contact normals are available.
|
|
123
108
|
|
|
124
109
|
## Other open notes
|
|
125
110
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WallRun.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/control/first-person/abilities/WallRun.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;IAMQ,qDAAqD;IACrD,iBAAiB;IACjB,yDAAyD;IACzD,cAAgB;IAGpB,kEAiBC;IAED,gDAqBC;IAED;;;;OAIG;IACH,wBAEC;IAED,
|
|
1
|
+
{"version":3,"file":"WallRun.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/control/first-person/abilities/WallRun.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH;IAMQ,qDAAqD;IACrD,iBAAiB;IACjB,yDAAyD;IACzD,cAAgB;IAGpB,kEAiBC;IAED,gDAqBC;IAED;;;;OAIG;IACH,wBAEC;IAED,uFAgEC;CAKJ;wBAjKuB,cAAc"}
|
|
@@ -131,43 +131,26 @@ export class WallRun extends Ability {
|
|
|
131
131
|
const rollSign = this._side === "L" ? -1 : 1;
|
|
132
132
|
runtime.leanTargetRad = rollSign * cfg.cameraRollDeg * DEG_TO_RAD;
|
|
133
133
|
|
|
134
|
-
// -- Reduced gravity.
|
|
134
|
+
// -- Reduced gravity. This is wall-run's OWN vertical model (a
|
|
135
|
+
// fraction of base gravity, no fall multiplier), applied here rather
|
|
136
|
+
// than via the system's standard gravity step.
|
|
135
137
|
runtime.velocityY -= runtime.gravity * cfg.gravityFactor * dt;
|
|
136
138
|
|
|
137
|
-
// --
|
|
138
|
-
//
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
)
|
|
144
|
-
|
|
145
|
-
//
|
|
146
|
-
//
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
//
|
|
150
|
-
//
|
|
151
|
-
|
|
152
|
-
//
|
|
153
|
-
// Consult the same effective ground the base integrator uses:
|
|
154
|
-
// max(useBuiltInFlatGround baseline, groundResolver). If we've
|
|
155
|
-
// sunk to or past it, snap, zero vy, and release — base will
|
|
156
|
-
// mark grounded on the next tick.
|
|
157
|
-
let groundY = system.useBuiltInFlatGround ? system.groundY : null;
|
|
158
|
-
if (system.groundResolver !== null) {
|
|
159
|
-
const resolved = system.groundResolver(
|
|
160
|
-
bodyTransform.position.x,
|
|
161
|
-
bodyTransform.position.y,
|
|
162
|
-
bodyTransform.position.z,
|
|
163
|
-
);
|
|
164
|
-
if (resolved !== null && (groundY === null || resolved > groundY)) {
|
|
165
|
-
groundY = resolved;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
if (groundY !== null && bodyTransform.position.y <= groundY) {
|
|
169
|
-
bodyTransform.position.setY(groundY);
|
|
170
|
-
runtime.velocityY = 0;
|
|
139
|
+
// -- Resolve the move through the shared motor. With the reduced-
|
|
140
|
+
// gravity velocity set above, route it through the same sweep-and-
|
|
141
|
+
// slide + ground-categorize the base locomotion uses (the mover when
|
|
142
|
+
// physics is present, else the flat-ground fallback). _resolveMotion
|
|
143
|
+
// does NOT re-apply gravity. This replaces a raw `position._add` plus
|
|
144
|
+
// a hand-rolled groundResolver catch: the wall-runner now (a) can't
|
|
145
|
+
// drift INTO geometry (the sweep clips it) nor sail OFF a ledge the
|
|
146
|
+
// mover would have caught, and (b) gets the motor's anti-tunnel
|
|
147
|
+
// ground catch for free — the same reason base no longer free-falls
|
|
148
|
+
// past a floor. The motor sets `state.grounded` and fires land/leave.
|
|
149
|
+
system._resolveMotion(controller, runtime, bodyTransform, dt);
|
|
150
|
+
|
|
151
|
+
// -- Exit: the motor caught a floor at the wall's foot (we ran out
|
|
152
|
+
// onto the ground). Release; base resumes next tick.
|
|
153
|
+
if (controller.state.grounded) {
|
|
171
154
|
return false;
|
|
172
155
|
}
|
|
173
156
|
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kinematic character collision solver — Phase 1 (recover +
|
|
3
|
+
* unified sweep-and-slide). See DESIGN_COLLISION.md.
|
|
4
|
+
*
|
|
5
|
+
* The mover is controller-agnostic: it knows about a capsule pose, a
|
|
6
|
+
* desired velocity, and the physics world. Its job is to take the
|
|
7
|
+
* velocity the control layer wants and return the position it actually
|
|
8
|
+
* reaches plus the velocity corrected for whatever it hit. It invents
|
|
9
|
+
* no motion — gravity / jump impulses live in the control layer and
|
|
10
|
+
* arrive folded into `velocity`.
|
|
11
|
+
*
|
|
12
|
+
* One move is a sequence (Phase 1 implements steps 1-2; ground
|
|
13
|
+
* categorize / stairs / settle land in later phases):
|
|
14
|
+
*
|
|
15
|
+
* 1. RECOVER — depenetration via `overlap()` + `compute_penetration`,
|
|
16
|
+
* run unconditionally so the move starts clear even from a
|
|
17
|
+
* start-solid state a pure sweep can't escape.
|
|
18
|
+
* 2. SLIDE — unified 3D collide-and-slide via `shapeCast`, clipping
|
|
19
|
+
* velocity onto true narrowphase contact normals. Crease-aware
|
|
20
|
+
* (Quake `SV_FlyMove`): a second plane re-violating the first is
|
|
21
|
+
* handled by sliding along their seam; a third (or a velocity
|
|
22
|
+
* reversal) dead-stops. Floors / ceilings / walls are all just
|
|
23
|
+
* contact planes, so vertical anti-tunnelling is automatic.
|
|
24
|
+
*
|
|
25
|
+
* @author Alex Goldring
|
|
26
|
+
* @copyright Company Named Limited (c) 2026
|
|
27
|
+
*/
|
|
28
|
+
export class KinematicMover {
|
|
29
|
+
/**
|
|
30
|
+
* @param {import("../../../physics/ecs/PhysicsSystem.js").PhysicsSystem} physicsSystem
|
|
31
|
+
* @param {import("../../../ecs/EntityComponentDataset.js").EntityComponentDataset} ecd
|
|
32
|
+
* used to resolve an overlapping `body_id` (via
|
|
33
|
+
* `physicsSystem.entityOf`) back to its {@link Transform} +
|
|
34
|
+
* {@link Collider} for `compute_penetration`.
|
|
35
|
+
* @param {object} [options]
|
|
36
|
+
* @param {number} [options.skin=0.005] clearance left after each
|
|
37
|
+
* sweep stop / push-out so the next query doesn't start in contact.
|
|
38
|
+
* @param {number} [options.maxSlideIterations=4] slide "bumps" per
|
|
39
|
+
* move (Quake `numbumps`).
|
|
40
|
+
* @param {number} [options.maxRecoverIterations=4] depenetration
|
|
41
|
+
* passes before giving up (deepest body pushed out per pass).
|
|
42
|
+
* @param {number} [options.minWalkNormal=0.7] minimum ground-normal Y
|
|
43
|
+
* to count as standable (~45.6°). Below it the surface is "too
|
|
44
|
+
* steep" — the player slides instead of grounding. Matches Quake3
|
|
45
|
+
* `MIN_WALK_NORMAL` / Source `normal.z ≥ 0.7`.
|
|
46
|
+
* @param {number} [options.stepHeight=0.3] maximum step the player
|
|
47
|
+
* traverses, both up and down:
|
|
48
|
+
* - UP: a riser no taller than this is climbed — by the explicit
|
|
49
|
+
* step-up ({@link _tryStepUp}, up-forward-down, which works
|
|
50
|
+
* regardless of forward momentum) and by `_categorizeGround`
|
|
51
|
+
* mounting the player onto a surface within `stepHeight` of the
|
|
52
|
+
* feet. A taller riser blocks (the slide stops the player; the
|
|
53
|
+
* step-up's forward clearance cast detects the wall and aborts).
|
|
54
|
+
* - DOWN: the ground-stick reach — walking off a drop no larger
|
|
55
|
+
* than this snaps the player onto the lower surface (stays
|
|
56
|
+
* grounded); a larger drop goes airborne (a real ledge).
|
|
57
|
+
* Source `sv_stepsize` is ~0.34 m; the default is just under the
|
|
58
|
+
* capsule radius so low ledges don't feel "magnetic".
|
|
59
|
+
*/
|
|
60
|
+
constructor(physicsSystem: import("../../../physics/ecs/PhysicsSystem.js").PhysicsSystem, ecd: import("../../../ecs/EntityComponentDataset.js").EntityComponentDataset, options?: {
|
|
61
|
+
skin?: number;
|
|
62
|
+
maxSlideIterations?: number;
|
|
63
|
+
maxRecoverIterations?: number;
|
|
64
|
+
minWalkNormal?: number;
|
|
65
|
+
stepHeight?: number;
|
|
66
|
+
});
|
|
67
|
+
physicsSystem: import("../../../physics/ecs/PhysicsSystem.js").PhysicsSystem;
|
|
68
|
+
ecd: import("../../../ecs/EntityComponentDataset.js").EntityComponentDataset;
|
|
69
|
+
skin: number;
|
|
70
|
+
maxSlideIterations: number;
|
|
71
|
+
maxRecoverIterations: number;
|
|
72
|
+
minWalkNormal: number;
|
|
73
|
+
stepHeight: number;
|
|
74
|
+
_ray: Ray3;
|
|
75
|
+
_hit: PhysicsSurfacePoint;
|
|
76
|
+
_overlapBuf: Uint32Array;
|
|
77
|
+
_penDir: Float64Array;
|
|
78
|
+
_planes: Float64Array;
|
|
79
|
+
_cand: Float64Array;
|
|
80
|
+
_support: Float64Array;
|
|
81
|
+
/**
|
|
82
|
+
* Reused result. `grounded` / `groundNormal` are Phase 2 outputs;
|
|
83
|
+
* in Phase 1 they're left at their defaults (the mover doesn't
|
|
84
|
+
* categorize ground yet).
|
|
85
|
+
* @type {{hit:boolean, grounded:boolean, groundNormal:Vector3}}
|
|
86
|
+
*/
|
|
87
|
+
_result: {
|
|
88
|
+
hit: boolean;
|
|
89
|
+
grounded: boolean;
|
|
90
|
+
groundNormal: Vector3;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Resolve one move. Mutates `position` to the resolved location and
|
|
94
|
+
* `velocity` to the corrected value.
|
|
95
|
+
*
|
|
96
|
+
* @param {Vector3} position in/out — current pose, written to the resolved pose
|
|
97
|
+
* @param {{x:number,y:number,z:number,w:number}} rotation capsule orientation (read)
|
|
98
|
+
* @param {import("../../../../core/geom/3d/shape/AbstractShape3D.js").AbstractShape3D} shape convex capsule
|
|
99
|
+
* @param {Vector3} velocity in/out — desired velocity, written to the corrected velocity
|
|
100
|
+
* @param {number} dt
|
|
101
|
+
* @param {(entity:number, collider:Collider)=>boolean} filter excludes
|
|
102
|
+
* the player's own body in integration; accept-all in isolation
|
|
103
|
+
* @returns {{hit:boolean, grounded:boolean, groundNormal:Vector3}} reused result
|
|
104
|
+
*/
|
|
105
|
+
move(position: Vector3, rotation: {
|
|
106
|
+
x: number;
|
|
107
|
+
y: number;
|
|
108
|
+
z: number;
|
|
109
|
+
w: number;
|
|
110
|
+
}, shape: import("../../../../core/geom/3d/shape/AbstractShape3D.js").AbstractShape3D, velocity: Vector3, dt: number, filter: (entity: number, collider: Collider) => boolean): {
|
|
111
|
+
hit: boolean;
|
|
112
|
+
grounded: boolean;
|
|
113
|
+
groundNormal: Vector3;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Stair step-up. Called after a slide that hit something while the
|
|
117
|
+
* player was trying to move horizontally on the ground. Re-runs the
|
|
118
|
+
* horizontal move from the pre-slide position lifted by `stepHeight`,
|
|
119
|
+
* guarded by a forward CLEARANCE cast: if the path is still blocked at
|
|
120
|
+
* the lifted height the obstacle is taller than a step (a wall) and we
|
|
121
|
+
* abandon the attempt; if clear it's a step, so advance over it and
|
|
122
|
+
* drop. Commits only when it advances farther horizontally than the
|
|
123
|
+
* plain slide and the rise is within `stepHeight`. On success the
|
|
124
|
+
* horizontal velocity is restored (the riser wasn't a wall) so the
|
|
125
|
+
* controller doesn't read back a stalled speed; the vertical is left
|
|
126
|
+
* for `_categorizeGround` to settle on the step.
|
|
127
|
+
*
|
|
128
|
+
* @private
|
|
129
|
+
*/
|
|
130
|
+
private _tryStepUp;
|
|
131
|
+
/**
|
|
132
|
+
* Distance the shape can sweep along a unit axis before contact (less
|
|
133
|
+
* `skin`), or the full `maxDist` if clear. For the step-up lift/drop.
|
|
134
|
+
* @private
|
|
135
|
+
*/
|
|
136
|
+
private _castDistance;
|
|
137
|
+
/**
|
|
138
|
+
* True when a centre raycast at (x,y,z) finds a walkable surface
|
|
139
|
+
* within stick range — gates step-up on "actually standing".
|
|
140
|
+
* @private
|
|
141
|
+
*/
|
|
142
|
+
private _groundedAt;
|
|
143
|
+
/**
|
|
144
|
+
* Push the capsule out of any geometry it currently overlaps. Each
|
|
145
|
+
* pass queries overlaps, finds the single deepest penetration via
|
|
146
|
+
* {@link compute_penetration}, and pushes out along its separation
|
|
147
|
+
* axis by `depth + skin`; re-queries until clear or the iteration
|
|
148
|
+
* cap is hit. Deepest-first converges multi-body resting contact
|
|
149
|
+
* (each pass removes the worst offender) without solving a system.
|
|
150
|
+
*
|
|
151
|
+
* @private
|
|
152
|
+
*/
|
|
153
|
+
private _recover;
|
|
154
|
+
/**
|
|
155
|
+
* Unified 3D collide-and-slide. Faithful to Quake's `SV_FlyMove`:
|
|
156
|
+
* sweep the velocity for the remaining time, stop at contact, clip
|
|
157
|
+
* the (original) velocity against every plane hit so far, slide
|
|
158
|
+
* along the seam of a two-plane crease, dead-stop on a third plane
|
|
159
|
+
* or a velocity reversal.
|
|
160
|
+
*
|
|
161
|
+
* @private
|
|
162
|
+
*/
|
|
163
|
+
private _slide;
|
|
164
|
+
/**
|
|
165
|
+
* Ground categorization + stick-to-ground + slope velocity clip.
|
|
166
|
+
* Probes below the feet to decide grounded-ness, the surface height
|
|
167
|
+
* to rest on, and the surface normal for the velocity clip.
|
|
168
|
+
*
|
|
169
|
+
* - `ascending` (jumped this tick) → never grounded; skip entirely
|
|
170
|
+
* so the snap can't cancel the jump.
|
|
171
|
+
* - no surface within `stepHeight` below the feet → airborne.
|
|
172
|
+
*
|
|
173
|
+
* Two probes, with a deliberate division of labour that's what makes
|
|
174
|
+
* stairs AND slopes both work (they're the same steep-normal contact
|
|
175
|
+
* to a single probe, so one probe can't tell them apart):
|
|
176
|
+
*
|
|
177
|
+
* (A) WALKABILITY + base height — a centre-point RAYCAST. It sees
|
|
178
|
+
* the actual planar surface under the feet and ignores both a
|
|
179
|
+
* step's convex top EDGE (whose normal is misleadingly steep)
|
|
180
|
+
* and a wall's vertical SIDE face. A steep normal here means a
|
|
181
|
+
* genuine steep SLOPE → not grounded (slide).
|
|
182
|
+
* (B) STEP height — a footprint capsule SHAPECAST. It raises the
|
|
183
|
+
* rest height onto a step the leading edge overhangs (which the
|
|
184
|
+
* centre ray, aimed behind the riser, misses). Used only when
|
|
185
|
+
* it genuinely swept (`hit.t > skin`, not start-solid in a wall)
|
|
186
|
+
* and the step is within `stepHeight`.
|
|
187
|
+
*
|
|
188
|
+
* Reference point is the capsule bottom (`position.y`), matching the
|
|
189
|
+
* feet-at-origin player capsule.
|
|
190
|
+
*
|
|
191
|
+
* @private
|
|
192
|
+
*/
|
|
193
|
+
private _categorizeGround;
|
|
194
|
+
/**
|
|
195
|
+
* `out = v - n·(v·n)` — project `v` onto the plane with unit normal
|
|
196
|
+
* `n` (overbounce 1.0; clearance handled by `skin`, so no extra
|
|
197
|
+
* nudge — equivalent in practice to Quake3's `OVERCLIP 1.001`).
|
|
198
|
+
* @private
|
|
199
|
+
*/
|
|
200
|
+
private _clip;
|
|
201
|
+
}
|
|
202
|
+
import { Ray3 } from "../../../../core/geom/3d/ray/Ray3.js";
|
|
203
|
+
import { PhysicsSurfacePoint } from "../../../physics/queries/PhysicsSurfacePoint.js";
|
|
204
|
+
import Vector3 from "../../../../core/geom/Vector3.js";
|
|
205
|
+
import { Collider } from "../../../physics/ecs/Collider.js";
|
|
206
|
+
//# sourceMappingURL=KinematicMover.d.ts.map
|
|
@@ -0,0 +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,CA4CjE;IAED;;;;;;;;;;;;;;OAcG;IACH,mBA0FC;IAED;;;;OAIG;IACH,sBAQC;IAED;;;;OAIG;IACH,oBASC;IAED;;;;;;;;;OASG;IACH,iBAwCC;IAED;;;;;;;;OAQG;IACH,eAmIC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,0BAsDC;IAED;;;;;OAKG;IACH,cAKC;CACJ;qBA9kBoB,sCAAsC;oCAIvB,iDAAiD;oBALjE,kCAAkC;yBAG7B,kCAAkC"}
|