diff --git a/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js b/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js index 38f26c9edc..ef61270b53 100644 --- a/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js +++ b/unpublishedScripts/DomainContent/Home/growingPlant/wrapper.js @@ -12,14 +12,13 @@ var PLANT_SCRIPT_URL = Script.resolvePath("growingPlantEntityScript.js?v1" + Math.random().toFixed(2)); var WATER_CAN_SCRIPT_URL = Script.resolvePath("waterCanEntityScript.js?v2" + Math.random().toFixed()); Plant = function(spawnPosition, spawnRotation) { - var orientation = Camera.getOrientation(); - orientation = Quat.safeEulerAngles(orientation); - orientation.x = 0; - orientation = Quat.fromVec3Degrees(orientation); + var orientation; if (spawnRotation !== undefined) { - orientation = spawnRotation; + orientation = Quat.fromPitchYawRollDegrees(spawnRotation.x, spawnRotation.y, spawnRotation.z); + } else { + orientation = Camera.getOrientation(); } - + print("EBL ORIENTATION " + JSON.stringify(orientation)); var bowlPosition = spawnPosition; var BOWL_MODEL_URL = "http://hifi-content.s3.amazonaws.com/alan/dev/Flowers--Bowl.fbx"; var bowlDimensions = { @@ -128,6 +127,13 @@ Plant = function(spawnPosition, spawnRotation) { var waterSpoutPosition = Vec3.sum(waterCanPosition, Vec3.multiply(0.2, Quat.getFront(orientation))) var waterSpoutRotation = Quat.multiply(waterCanRotation, Quat.fromPitchYawRollDegrees(10, 0, 0)); + // var waterSpoutRotation = { + // x: waterSpoutRotation.x, + // y: waterSpoutRotation.y, + // z: waterSpoutRotation.z, + // w: waterSpoutRotation.w + // }; + print("EBL SET ROTATION") var waterSpout = Entities.addEntity({ type: "Box", name: "hifi-water-spout", @@ -144,7 +150,7 @@ Plant = function(spawnPosition, spawnRotation) { position: waterSpoutPosition, rotation: waterSpoutRotation, parentID: waterCan, - visible: false, + // visible: false, userData: JSON.stringify({ 'hifiHomeKey': { 'reset': true diff --git a/unpublishedScripts/DomainContent/Home/reset.js b/unpublishedScripts/DomainContent/Home/reset.js index 6ee2557890..083caac8e4 100644 --- a/unpublishedScripts/DomainContent/Home/reset.js +++ b/unpublishedScripts/DomainContent/Home/reset.js @@ -89,7 +89,7 @@ _this.showTidyingButton(); _this.playTidyingSound(); - // _this.findAndDeleteHomeEntities(); + _this.findAndDeleteHomeEntities(); Script.setTimeout(function() { _this.showTidyButton(); _this.tidying = false;