Raanan Weber před 4 roky
rodič
revize
6a16341687
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/XR/features/WebXRControllerTeleportation.ts

+ 1 - 1
src/XR/features/WebXRControllerTeleportation.ts

@@ -397,9 +397,9 @@ export class WebXRMotionControllerTeleportation extends WebXRAbstractFeature {
                 // set the ray and position
                 // set the ray and position
 
 
                 let hitPossible = false;
                 let hitPossible = false;
+                controllerData.xrController.getWorldPointerRayToRef(this._tmpRay);
                 if (this.straightRayEnabled) {
                 if (this.straightRayEnabled) {
                     // first check if direct ray possible
                     // first check if direct ray possible
-                    controllerData.xrController.getWorldPointerRayToRef(this._tmpRay);
                     // pick grounds that are LOWER only. upper will use parabolic path
                     // pick grounds that are LOWER only. upper will use parabolic path
                     let pick = scene.pickWithRay(this._tmpRay, (o) => {
                     let pick = scene.pickWithRay(this._tmpRay, (o) => {
                         // check for mesh-blockers
                         // check for mesh-blockers