@woosh/meep-engine 3.6.0 → 3.8.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.
@@ -30,10 +30,12 @@
30
30
  * refinement which the broadphase-only architecture doesn't have
31
31
  * wired up yet.
32
32
  * - `result.normal` — target surface's outward normal at the kiss
33
- * point (unit length), computed by running GJK + EPA against the
34
- * just-overlapping configuration at the TOI. Falls back to
35
- * `-ray.direction` on the rare case EPA degenerates (NaN / zero
36
- * depth) see comment near the EPA call.
33
+ * point (unit length), recovered by running MPR against the
34
+ * just-overlapping configuration at the TOI. A pair that is exactly
35
+ * tangent there carries no MTV to read, so a second probe nudged
36
+ * toward the target's centre supplies one; `-ray.direction` remains
37
+ * the last-resort fallback if both degenerate. See the
38
+ * contact-normal recovery block near the end of the function.
37
39
  * - `result.entity` / `result.body_id` — the hit body.
38
40
  *
39
41
  * Output on miss: untouched; same convention as `raycast`.
@@ -52,12 +54,15 @@
52
54
  * distinguishes bodies when colliders live on child entities)
53
55
  * @param {boolean} [skip_initial_overlaps=false] how a candidate ALREADY
54
56
  * overlapping the swept shape at `t = 0` is treated. `false` (kinematic
55
- * "can I move?" semantics): the cast is blocked where it stands — report a
56
- * hit at `t = 0`. `true` (CCD semantics): such a candidate is a resting /
57
- * sliding contact the discrete solver already owns, NOT a tunnelling
58
- * threat skip it and keep scanning the remaining candidates for real
59
- * blockers along the sweep. Without the skip, one resting contact at the
60
- * start of the sweep would blind the cast to every other obstacle.
57
+ * "can I move?" semantics): targets are solid, so the cast is blocked where
58
+ * it stands — report a hit at `t = 0`. The one exception is a convex target
59
+ * the shape merely TOUCHES (no depth beyond {@link CONTACT_EPSILON}): a
60
+ * tangency blocks only a sweep driving into it, and otherwise steps aside so
61
+ * the scan can reach real blockers. `true` (CCD semantics): such a candidate
62
+ * is a resting / sliding contact the discrete solver already owns, NOT a
63
+ * tunnelling threat — skip it and keep scanning the remaining candidates for
64
+ * real blockers along the sweep. Either way, one contact at the start of the
65
+ * sweep must never blind the cast to every other obstacle.
61
66
  * @returns {boolean}
62
67
  */
63
68
  export function shape_cast(system: PhysicsSystem, ray: any, shape: AbstractShape3D, rotation: {
@@ -1 +1 @@
1
- {"version":3,"file":"shape_cast.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/queries/shape_cast.js"],"names":[],"mappings":"AAyEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,8FAhBW;IAAC,CAAC,EAAC,MAAM,CAAC;IAAA,CAAC,EAAC,MAAM,CAAC;IAAA,CAAC,EAAC,MAAM,CAAC;IAAA,CAAC,EAAC,MAAM,CAAA;CAAC,iDAE7B,MAAM,+BAA6B,MAAM,KAAG,OAAO,0BAI3D,OAAO,GAQL,OAAO,CA2RnB"}
1
+ {"version":3,"file":"shape_cast.d.ts","sourceRoot":"","sources":["../../../../../src/engine/physics/queries/shape_cast.js"],"names":[],"mappings":"AAoPA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AACH,8FAnBW;IAAC,CAAC,EAAC,MAAM,CAAC;IAAA,CAAC,EAAC,MAAM,CAAC;IAAA,CAAC,EAAC,MAAM,CAAC;IAAA,CAAC,EAAC,MAAM,CAAA;CAAC,iDAE7B,MAAM,+BAA6B,MAAM,KAAG,OAAO,0BAI3D,OAAO,GAWL,OAAO,CAsTnB"}