@series-inc/rundot-syncplay 5.26.0-beta.4 → 5.26.0-beta.5

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 (2) hide show
  1. package/dist/physics3d.js +11 -1
  2. package/package.json +1 -1
package/dist/physics3d.js CHANGED
@@ -761,7 +761,11 @@ export function raycastDeterministicPhysics3DDetailed(world, query) {
761
761
  */
762
762
  function bodyOverlapsQueryShape(body, shape, x, y, z, queryBounds) {
763
763
  if (body.shape.type === 'heightfield') {
764
- return bodyOverlapsQueryShape({ ...body, shape: heightfieldMeshShape(body.shape, localBoundsForHeightfield(body, queryBounds)) }, shape, x, y, z, queryBounds);
764
+ const mesh = heightfieldMeshShape(body.shape, localBoundsForHeightfield(body, queryBounds));
765
+ if (mesh.vertices.length === 0) {
766
+ return false;
767
+ }
768
+ return bodyOverlapsQueryShape({ ...body, shape: mesh }, shape, x, y, z, queryBounds);
765
769
  }
766
770
  if (shape.type === 'heightfield') {
767
771
  return bodyOverlapsQueryShape(body, heightfieldMeshShape(shape), x, y, z, queryBounds);
@@ -3100,6 +3104,9 @@ function rayBodyDistance(body, query) {
3100
3104
  }
3101
3105
  if (body.shape.type === 'heightfield') {
3102
3106
  const mesh = heightfieldMeshShape(body.shape, localBoundsForHeightfield(body, raySweepBounds(query)));
3107
+ if (mesh.vertices.length === 0) {
3108
+ return undefined;
3109
+ }
3103
3110
  return rayMeshDistance(meshPose({ ...bodyPose(body), shape: mesh }, mesh), query);
3104
3111
  }
3105
3112
  if (body.shape.type === 'hull') {
@@ -3163,6 +3170,9 @@ function shapeCastBodyDistance(body, query) {
3163
3170
  }
3164
3171
  if (body.shape.type === 'heightfield') {
3165
3172
  const mesh = heightfieldMeshShape(body.shape, localBoundsForHeightfield(body, shapeCastSweepBounds(query)));
3173
+ if (mesh.vertices.length === 0) {
3174
+ return undefined;
3175
+ }
3166
3176
  return rayExpandedMeshDistance(meshPose({ ...bodyPose(body), shape: mesh }, mesh), query, query.shape.radius);
3167
3177
  }
3168
3178
  if (body.shape.type === 'sphere') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@series-inc/rundot-syncplay",
3
- "version": "5.26.0-beta.4",
3
+ "version": "5.26.0-beta.5",
4
4
  "description": "Kinetix orchestration, rollback, replay, late-join, and deterministic networking for RUN.game",
5
5
  "repository": {
6
6
  "type": "git",