Skip to content

Commit

Permalink
disable transition clicking on waypoint for now because navigation-st…
Browse files Browse the repository at this point in the history
…art event trigger unoccupyWaypoint (#20)
  • Loading branch information
vincentfretin committed Mar 19, 2024
1 parent 3e7d5b4 commit 0d7fafd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/waypoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ AFRAME.registerComponent("waypoint", {

const euler = new THREE.Euler().setFromQuaternion(spawnPoint.object3D.quaternion, "YXZ");
const rotation = { x: 0, y: euler.y * THREE.MathUtils.RAD2DEG + 180, z: 0 };
// Force withTransition=false for now, using cursorTeleport.teleportTo(position, quaternion) emits the navigation-start event
// that triggers unoccupyWaypoint because of the listener in player-info.
withTransition = false;
this.system.teleportTo(position, rotation, withTransition);
cameraRig.setAttribute("player-info", { seatRotation: camera.object3D.rotation.y });
},
Expand Down

0 comments on commit 0d7fafd

Please sign in to comment.