Repair d-pad use, and fix silly error
This commit is contained in:
parent
91a7334351
commit
7d253d385e
|
@ -296,7 +296,6 @@ export class RunningEngine {
|
|||
if (actionButton.wasReleased && this.xrTeleportTimer !== null) {
|
||||
this.clearTeleportTimer();
|
||||
let a = 0;
|
||||
let a = Quaternion.Identity();
|
||||
if (state.b(13 /* dPadDown */).isDown) a = 1;
|
||||
if (state.b(14 /* dPadLeft */).isDown) a = -0.5;
|
||||
if (state.b(15 /* dPadRight */).isDown) a = 0.5;
|
||||
|
@ -378,8 +377,8 @@ export class RunningEngine {
|
|||
xrStepOrTouch(a: Quaternion) {
|
||||
if (!this.inXR) return;
|
||||
|
||||
const ray = this.xrCamera!.getForwardRay();
|
||||
ray.direction.rotateByQuaternionToRef(a, ray.direction);
|
||||
const ray = new Ray(this.xrCamera!.position, new Vector3(0, 0, 1));
|
||||
ray.direction.applyRotationQuaternionInPlace(this.xrCamera!.absoluteRotation.multiply(a));
|
||||
const hit = this.scene.pickWithRay(ray);
|
||||
|
||||
if (hit !== null
|
||||
|
|
Loading…
Reference in New Issue