From 7c515ccd452d3d6322916675893aaab199494664 Mon Sep 17 00:00:00 2001 From: r3tk0n Date: Tue, 26 Feb 2019 19:16:45 -0800 Subject: [PATCH] Add 2x rotation multiplier. --- .../controllerModules/farGrabEntity.js | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/scripts/system/controllers/controllerModules/farGrabEntity.js b/scripts/system/controllers/controllerModules/farGrabEntity.js index 756f8cd0db..ea0c3e8ad6 100644 --- a/scripts/system/controllers/controllerModules/farGrabEntity.js +++ b/scripts/system/controllers/controllerModules/farGrabEntity.js @@ -252,7 +252,8 @@ Script.include("/~/system/libraries/controllers.js"); var rot = Quat.multiply(pose.rotation, MyAvatar.orientation); var rotBetween = this.calculateEntityRotationManipulation(rot); - this.lastJointRotation = Quat.multiply(rotBetween, this.initialEntityRotation); + var doubleRot = Quat.multiply(rotBetween, rotBetween); + this.lastJointRotation = Quat.multiply(doubleRot, this.initialEntityRotation); this.setJointRotation(this.lastJointRotation); } else { if (this.manipulating) { @@ -359,8 +360,6 @@ Script.include("/~/system/libraries/controllers.js"); grabMapping = Controller.newMapping(mappingName); grabMapping.from(Controller.Standard.LT).peek().to(_this.getLeftTrigger); grabMapping.from(Controller.Standard.RT).peek().to(_this.getRightTrigger); - grabMapping.from(Controller.Standard.LeftGrip).peek().to(_this.setLeftGrip); - grabMapping.from(Controller.Standard.RightGrip).peek().to(_this.setRightGrip); Controller.enableMapping(mappingName); }; @@ -375,8 +374,6 @@ Script.include("/~/system/libraries/controllers.js"); this.leftTrigger = 0.0; this.rightTrigger = 0.0; - this.leftGrip = 0.0; - this.rightGrip = 0.0; this.getDominantHand = function () { return (MyAvatar.getDominantHand() === "left") ? LEFT_HAND : RIGHT_HAND; @@ -402,22 +399,6 @@ Script.include("/~/system/libraries/controllers.js"); return (MyAvatar.getDominantHand() === "left") ? (_this.rightTrigger) : (_this.leftTrigger); }; - this.setLeftGrip = function (value) { - this.leftGrip = value; - }; - - this.setRightGrip = function (value) { - this.rightGrip = value; - }; - - this.getDominantGrip = function () { - return (MyAvatar.getDominantHand() === "left" ? (_this.leftGrip) : (_this.rightGrip)); - }; - - this.getOffhandGrip = function () { - return (MyAvatar.getDominantHand() === "left" ? (_this.rightGrip) : (_this.leftGrip)); - }; - this.shouldShowLaser = function () { return (_this.getOffHandTrigger() > TRIGGER_ON_VALUE) ? true : false; };