From 3db8c5b4a77333e9f4e2d2972f23f81ec3159000 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Mon, 23 Jan 2017 16:36:04 -0800 Subject: [PATCH] Fix tilt on tablet for HMD users without hand controllers --- scripts/system/libraries/WebTablet.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/system/libraries/WebTablet.js b/scripts/system/libraries/WebTablet.js index 903065dd2e..6b18f06059 100644 --- a/scripts/system/libraries/WebTablet.js +++ b/scripts/system/libraries/WebTablet.js @@ -64,9 +64,10 @@ function calcSpawnInfo(hand, height) { } else { var front = Quat.getFront(Camera.orientation); finalPosition = Vec3.sum(Camera.position, Vec3.multiply(0.6, front)); + var orientation = Quat.lookAt({x: 0, y: 0, z: 0}, front, {x: 0, y: 1, z: 0}); return { position: finalPosition, - rotation: Quat.multiply(Camera.orientation, {x: 0, y: 1, z: 0, w: 0}) + rotation: Quat.multiply(orientation, {x: 0, y: 1, z: 0, w: 0}) }; } }