From 2ca4203d85c9eece148743b7bc83ea2a9b0aa607 Mon Sep 17 00:00:00 2001 From: Faye Li Date: Mon, 3 Apr 2017 12:57:51 -0700 Subject: [PATCH] fix for submerge in floor issue --- .../utilities/render/photobooth/photoboothApp.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/developer/utilities/render/photobooth/photoboothApp.js b/scripts/developer/utilities/render/photobooth/photoboothApp.js index dcbf363c3d..154028f091 100644 --- a/scripts/developer/utilities/render/photobooth/photoboothApp.js +++ b/scripts/developer/utilities/render/photobooth/photoboothApp.js @@ -102,16 +102,16 @@ var success = Clipboard.importEntities(PHOTOBOOTH_SETUP_JSON_URL); var frontFactor = 10; // getForward is preffered as getFront function is deprecated - var frontUnitVec = (typeof Quat.getForward === "undefined") ? Vec3.normalize(Quat.getFront(MyAvatar.orientation)) : Vec3.normalize(Quat.getForward(MyAvatar.orientation)); + var frontUnitVec = Vec3.normalize(Quat.getFront(MyAvatar.orientation)); var frontOffset = Vec3.multiply(frontUnitVec,frontFactor); - var rightFactor = 3; - var rightUnitVec = Vec3.normalize(Quat.getRight(MyAvatar.orientation)); - var rightOffset = Vec3.multiply(rightUnitVec,rightFactor); - var spawnLocation = Vec3.sum(Vec3.sum(MyAvatar.position,frontOffset),rightOffset); + var upFactor = 3; + var upUnitVec = Vec3.normalize(Quat.getUp(MyAvatar.orientation)); + var upOffset = Vec3.multiply(upUnitVec, upFactor); + var spawnLocation = Vec3.sum(MyAvatar.position,frontOffset); + spawnLocation = Vec3.sum(spawnLocation, upOffset); if (success) { this.pastedEntityIDs = Clipboard.pasteEntities(spawnLocation); this.processPastedEntities(); - } };