From 4e4545ac0030d6ca2a2571a784ab9bfd72458c40 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Thu, 19 Jan 2017 20:27:06 -0800 Subject: [PATCH] Updated orientation of tablet when no hand controllers are present. --- scripts/system/libraries/WebTablet.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/system/libraries/WebTablet.js b/scripts/system/libraries/WebTablet.js index decc947b02..2e89a2c73b 100644 --- a/scripts/system/libraries/WebTablet.js +++ b/scripts/system/libraries/WebTablet.js @@ -58,11 +58,11 @@ function calcSpawnInfo(hand, height) { rotation: lookAtRot }; } else { - var front = Quat.getFront(MyAvatar.orientation); - finalPosition = Vec3.sum(Vec3.sum(MyAvatar.position, Vec3.multiply(0.6, front)), {x: 0, y: 0.6, z: 0}); + var front = Quat.getFront(Camera.orientation); + finalPosition = Vec3.sum(Camera.position, Vec3.multiply(0.6, front)); return { position: finalPosition, - rotation: Quat.lookAt(finalPosition, MyAvatar.getHeadPosition(), Y_AXIS) + rotation: Quat.multiply(Camera.orientation, {x: 0, y: 1, z: 0, w: 0}) }; } }