From 04efea7293ed7383de393a70c73f464d4b5f2ed0 Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Fri, 16 Dec 2016 14:53:17 -0800 Subject: [PATCH] Cleanup implementation of touch controller config --- .../system/controllers/controllerDisplayManager.js | 4 +--- .../controllers/touchControllerConfiguration.js | 13 ++++--------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/scripts/system/controllers/controllerDisplayManager.js b/scripts/system/controllers/controllerDisplayManager.js index b9a0717e8b..56becfc453 100644 --- a/scripts/system/controllers/controllerDisplayManager.js +++ b/scripts/system/controllers/controllerDisplayManager.js @@ -15,12 +15,10 @@ Script.include("controllerDisplay.js"); Script.include("viveControllerConfiguration.js"); -Script.include("touchControllerConfiguration.js?" + Date.now()); +Script.include("touchControllerConfiguration.js"); var HIDE_CONTROLLERS_ON_EQUIP = false; -HMD.requestShowHandControllers(); - // // Management of controller display // diff --git a/scripts/system/controllers/touchControllerConfiguration.js b/scripts/system/controllers/touchControllerConfiguration.js index 747c4bdf91..1e1ddea4f4 100644 --- a/scripts/system/controllers/touchControllerConfiguration.js +++ b/scripts/system/controllers/touchControllerConfiguration.js @@ -12,7 +12,7 @@ /* eslint camelcase: ["error", { "properties": "never" }] */ var leftBaseRotation = Quat.multiply( - Quat.fromPitchYawRollDegrees(0, 0, 45), + Quat.fromPitchYawRollDegrees(0, 0, 0), Quat.multiply( Quat.fromPitchYawRollDegrees(-90, 0, 0), Quat.fromPitchYawRollDegrees(0, 0, 90) @@ -34,13 +34,8 @@ var CONTROLLER_LATERAL_OFFSET = 0.0381; var CONTROLLER_VERTICAL_OFFSET = 0.0381; var CONTROLLER_FORWARD_OFFSET = 0.1524; -var leftBasePosition = { - x: CONTROLLER_VERTICAL_OFFSET, - y: CONTROLLER_FORWARD_OFFSET, - z: CONTROLLER_LATERAL_OFFSET -}; -leftBasePosition = Vec3.multiplyQbyV(rightBaseRotation, { - x: CONTROLLER_LENGTH_OFFSET / 2.0, +var leftBasePosition = Vec3.multiplyQbyV(leftBaseRotation, { + x: -CONTROLLER_LENGTH_OFFSET / 2.0, y: CONTROLLER_LENGTH_OFFSET / 2.0, z: CONTROLLER_LENGTH_OFFSET * 1.5 }); @@ -61,7 +56,7 @@ TOUCH_CONTROLLER_CONFIGURATION_LEFT = { naturalPosition: { x: 0.01648625358939171, y: -0.03551870584487915, z: -0.018527675420045853 }, dimensions: { x: 0.11053799837827682, y: 0.0995776429772377, z: 0.10139888525009155 }, rotation: leftBaseRotation, - position: Vec3.multiplyQbyV(Quat.fromPitchYawRollDegrees(0, 0, 45), leftBasePosition), + position: leftBasePosition, parts: { tips: {