Explorar el Código

right handed system support

Raanan Weber hace 5 años
padre
commit
5621d7d0b8
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/XR/features/WebXRControllerPointerSelection.ts

+ 3 - 0
src/XR/features/WebXRControllerPointerSelection.ts

@@ -546,6 +546,9 @@ export class WebXRControllerPointerSelection extends WebXRAbstractFeature {
     private _updatePointerDistance(_laserPointer: AbstractMesh, distance: number = 100) {
         _laserPointer.scaling.y = distance;
         // a bit of distance from the controller
+        if (this._scene.useRightHandedSystem) {
+            distance *= -1;
+        }
         _laserPointer.position.z = (distance / 2) + 0.05;
     }
 }