Merge pull request #11414 from druiz17/fix-tablet-position

Fix tablet up orientation for wiki planet
This commit is contained in:
Seth Alves 2017-09-20 12:30:00 -07:00 committed by GitHub
commit 1ca42cc632

View file

@ -51,7 +51,7 @@ function calcSpawnInfo(hand, landscape) {
var forward = Quat.getForward(headRot);
var FORWARD_OFFSET = 0.6 * MyAvatar.sensorToWorldScale;
finalPosition = Vec3.sum(headPos, Vec3.multiply(FORWARD_OFFSET, forward));
var orientation = Quat.lookAt({x: 0, y: 0, z: 0}, forward, {x: 0, y: 1, z: 0});
var orientation = Quat.lookAt({x: 0, y: 0, z: 0}, forward, Vec3.multiplyQbyV(MyAvatar.orientation, Vec3.UNIT_Y));
return {
position: finalPosition,
rotation: landscape ? Quat.multiply(orientation, ROT_LANDSCAPE) : Quat.multiply(orientation, ROT_Y_180)