@relu-interactives/spatial-ecs 0.3.15 → 0.3.17

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.
@@ -550,6 +550,8 @@ declare class XRLocomotionSystem implements EcsSystem {
550
550
  private aimValid;
551
551
  /** Sources currently aiming via thumbstick (hysteresis, so it doesn't chatter). */
552
552
  private readonly stickAiming;
553
+ /** One-time warning when a committed teleport found nowhere to land. */
554
+ private warnedNoLanding;
553
555
  /** Gates teleport commits on a prior aim. See {@link TeleportAimGate}. */
554
556
  private readonly teleportAim;
555
557
  /** True once we've tried to self-heal camera parenting for this session. */
@@ -550,6 +550,8 @@ declare class XRLocomotionSystem implements EcsSystem {
550
550
  private aimValid;
551
551
  /** Sources currently aiming via thumbstick (hysteresis, so it doesn't chatter). */
552
552
  private readonly stickAiming;
553
+ /** One-time warning when a committed teleport found nowhere to land. */
554
+ private warnedNoLanding;
553
555
  /** Gates teleport commits on a prior aim. See {@link TeleportAimGate}. */
554
556
  private readonly teleportAim;
555
557
  /** True once we've tried to self-heal camera parenting for this session. */
package/dist/index.cjs CHANGED
@@ -11875,6 +11875,8 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
11875
11875
  this.aimValid = false;
11876
11876
  /** Sources currently aiming via thumbstick (hysteresis, so it doesn't chatter). */
11877
11877
  this.stickAiming = /* @__PURE__ */ new WeakSet();
11878
+ /** One-time warning when a committed teleport found nowhere to land. */
11879
+ this.warnedNoLanding = false;
11878
11880
  /** Gates teleport commits on a prior aim. See {@link TeleportAimGate}. */
11879
11881
  this.teleportAim = new TeleportAimGate();
11880
11882
  /** True once we've tried to self-heal camera parenting for this session. */
@@ -12021,7 +12023,8 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
12021
12023
  }
12022
12024
  const stick = this.readStickAim(input, source);
12023
12025
  const aiming = input.select || input.selectStart || stick.aiming;
12024
- const releasing = input.selectEnd || stick.released;
12026
+ const vanished = !input.connected && this.teleportAim.isAiming(source);
12027
+ const releasing = input.selectEnd || stick.released || vanished;
12025
12028
  const commit = this.teleportAim.update(source, aiming, releasing);
12026
12029
  if (!aiming && !commit) continue;
12027
12030
  const points = sampleTeleportArc(
@@ -12041,6 +12044,12 @@ var _XRLocomotionSystem = class _XRLocomotionSystem {
12041
12044
  this.landingPoint = null;
12042
12045
  this.aimValid = false;
12043
12046
  } else if (commit) {
12047
+ if (!this.warnedNoLanding) {
12048
+ this.warnedNoLanding = true;
12049
+ console.warn(
12050
+ "[XRLocomotionSystem] Teleport released but the arc did not land on a Teleport Area. Add a teleportArea entity where the player should be able to go."
12051
+ );
12052
+ }
12044
12053
  this.aimCurve = [];
12045
12054
  this.aimValid = false;
12046
12055
  }