diff --git a/interface/resources/controllers/standard.json b/interface/resources/controllers/standard.json index 8f798c9051..e067a77733 100644 --- a/interface/resources/controllers/standard.json +++ b/interface/resources/controllers/standard.json @@ -19,7 +19,7 @@ "to": "Actions.StepYaw", "filters": [ - { "type": "deadZone", "min": 0.15 }, + { "type": "deadZone", "min": 0.65 }, "constrainToInteger", { "type": "pulse", "interval": 0.25 }, { "type": "scale", "scale": 22.5 } @@ -37,7 +37,7 @@ "to": "Actions.StepYaw", "filters": [ - { "type": "deadZone", "min": 0.15 }, + { "type": "deadZone", "min": 0.65 }, "constrainToInteger", { "type": "pulse", "interval": 0.25 }, { "type": "scale", "scale": 22.5 } diff --git a/plugins/openxr/src/OpenXrInputPlugin.cpp b/plugins/openxr/src/OpenXrInputPlugin.cpp index 3571f22251..909efce2a4 100644 --- a/plugins/openxr/src/OpenXrInputPlugin.cpp +++ b/plugins/openxr/src/OpenXrInputPlugin.cpp @@ -797,8 +797,6 @@ void OpenXrInputPlugin::InputDevice::update(float deltaTime, const controller::I } } - awfulRightStickHackForBrokenScripts(); - if (_context->_stickEmulation) { emulateStickFromTrackpad(); } @@ -849,31 +847,6 @@ void OpenXrInputPlugin::InputDevice::emulateStickFromTrackpad() { } } -// FIXME: the vr controller scripts are horribly broken and don't work properly, -// this emulates a segmented vive trackpad to get teleport and snap turning behaving -void OpenXrInputPlugin::InputDevice::awfulRightStickHackForBrokenScripts() { - auto stick = _actions.at("right_thumbstick")->getVector2f().currentState; - - _axisStateMap[controller::RX].value = 0.0f; - _axisStateMap[controller::RY].value = 0.0f; - - if (stick.x < -0.6f && stick.y > -0.4f && stick.y < 0.4f) { - _axisStateMap[controller::RX].value = -1.0f; - } - - if (stick.x > 0.6f && stick.y > -0.4f && stick.y < 0.4f) { - _axisStateMap[controller::RX].value = 1.0f; - } - - if (stick.y > 0.6f && stick.x > -0.4f && stick.x < 0.4f) { - _axisStateMap[controller::RY].value = -1.0f; - } - - if (stick.y < -0.6f && stick.x > -0.4f && stick.x < 0.4f) { - _axisStateMap[controller::RY].value = 1.0f; - } -} - void OpenXrInputPlugin::InputDevice::getHandTrackingInputs(int i, const mat4& sensorToAvatar) { if (_handTracker[i] == XR_NULL_HANDLE) { return; } if (!_context->_lastPredictedDisplayTime.has_value()) { return; } diff --git a/plugins/openxr/src/OpenXrInputPlugin.h b/plugins/openxr/src/OpenXrInputPlugin.h index a3ea3a85de..9d8632ed53 100644 --- a/plugins/openxr/src/OpenXrInputPlugin.h +++ b/plugins/openxr/src/OpenXrInputPlugin.h @@ -83,7 +83,6 @@ private: bool triggerHapticPulse(float strength, float duration, uint16_t index) override; void emulateStickFromTrackpad(); - void awfulRightStickHackForBrokenScripts(); void getHandTrackingInputs(int index, const mat4& sensorToAvatar); mutable std::recursive_mutex _lock; diff --git a/scripts/system/libraries/controllerDispatcherUtils.js b/scripts/system/libraries/controllerDispatcherUtils.js index 71eacebe8e..5581bbd235 100644 --- a/scripts/system/libraries/controllerDispatcherUtils.js +++ b/scripts/system/libraries/controllerDispatcherUtils.js @@ -112,7 +112,7 @@ var TEAR_AWAY_DISTANCE = 0.15; // ungrab an entity if its bounding-box moves thi var TEAR_AWAY_COUNT = 2; // multiply by TEAR_AWAY_CHECK_TIME to know how long the item must be away var TEAR_AWAY_CHECK_TIME = 0.15; // seconds, duration between checks -var TELEPORT_DEADZONE = 0.15; +var TELEPORT_DEADZONE = 0.65; var NEAR_GRAB_DISTANCE = 0.14; // Grab an entity if its bounding box is within this distance. // Smaller than TEAR_AWAY_DISTANCE for hysteresis.