mirror of
https://github.com/overte-org/overte.git
synced 2025-04-05 18:19:26 +02:00
Fix thumbstick press issue for translation (not rotation yet)
This commit is contained in:
parent
387778aeca
commit
474f52a4f3
3 changed files with 155 additions and 1 deletions
147
interface/resources/controllers/index.json
Normal file
147
interface/resources/controllers/index.json
Normal file
|
@ -0,0 +1,147 @@
|
|||
{
|
||||
"name": "Vive to Standard",
|
||||
"channels": [
|
||||
{ "from": "Vive.LY", "to": "Standard.LeftIndexPoint",
|
||||
"peek": true,
|
||||
"filters": [ { "type": "hysteresis", "min": 0.7, "max": 0.75 } ]
|
||||
},
|
||||
{ "from": "Vive.RY", "to": "Standard.RightIndexPoint",
|
||||
"peek": true,
|
||||
"filters": [ { "type": "hysteresis", "min": 0.7, "max": 0.75 } ]
|
||||
},
|
||||
|
||||
{ "from": "Vive.LY", "filters": [ { "type": "deadZone", "min": 0.15 }, "invert" ], "to": "Standard.LY" },
|
||||
{ "from": "Vive.LX", "when": ["Application.RightHandDominant"], "filters": { "type": "deadZone", "min": 0.15 }, "to": "Standard.LX" },
|
||||
{ "from": "Vive.LX", "when": ["Vive.LSX", "!Vive.LSY", "Application.LeftHandDominant"], "filters": { "type": "deadZone", "min": 0.15 }, "to": "Standard.LX" },
|
||||
{
|
||||
"from": "Vive.LT", "to": "Standard.LT",
|
||||
"filters": [
|
||||
{ "type": "deadZone", "min": 0.05 }
|
||||
]
|
||||
},
|
||||
{ "from": "Vive.LTClick", "to": "Standard.LTClick" },
|
||||
|
||||
{ "from": "Vive.LeftGrip", "to": "Standard.LeftGrip" },
|
||||
{ "from": "Vive.LS", "to": "Standard.LS" },
|
||||
{ "from": "Vive.LSTouch", "to": "Standard.LeftThumbUp",
|
||||
"peek": true,
|
||||
"filters": [ { "type": "logicalNot" } ]
|
||||
},
|
||||
{ "from": "Vive.LSTouch", "to": "Standard.LSTouch" },
|
||||
|
||||
{ "from": "Vive.RY", "filters": [ { "type": "deadZone", "min": 0.15 }, "invert" ], "to": "Standard.RY" },
|
||||
{ "from": "Vive.RX", "when": ["Application.LeftHandDominant"], "filters": { "type": "deadZone", "min": 0.15 }, "to": "Standard.RX" },
|
||||
{ "from": "Vive.RX", "when": ["Vive.RSX", "!Vive.RSY", "Application.RightHandDominant"], "filters": { "type": "deadZone", "min": 0.15 }, "to": "Standard.RX" },
|
||||
{
|
||||
"from": "Vive.RT", "to": "Standard.RT",
|
||||
"filters": [
|
||||
{ "type": "deadZone", "min": 0.05 }
|
||||
]
|
||||
},
|
||||
{ "from": "Vive.RTClick", "to": "Standard.RTClick" },
|
||||
|
||||
{ "from": "Vive.RightGrip", "to": "Standard.RightGrip" },
|
||||
{ "from": "Vive.RS", "to": "Standard.RS" },
|
||||
{ "from": "Vive.RSTouch", "to": "Standard.RightThumbUp",
|
||||
"peek": true,
|
||||
"filters": [ { "type": "logicalNot" } ]
|
||||
},
|
||||
{ "from": "Vive.RSTouch", "to": "Standard.RSTouch" },
|
||||
|
||||
{ "from": "Vive.LSCenter", "to": "Standard.LeftPrimaryThumb" },
|
||||
{ "from": "Vive.LeftApplicationMenu", "to": "Standard.LeftSecondaryThumb" },
|
||||
{ "from": "Vive.RSCenter", "to": "Standard.RightPrimaryThumb" },
|
||||
{ "from": "Vive.RightApplicationMenu", "to": "Standard.RightSecondaryThumb" },
|
||||
|
||||
{ "from": "Vive.LeftHand", "to": "Standard.LeftHand" },
|
||||
{ "from": "Vive.LeftHandThumb1", "to": "Standard.LeftHandThumb1"},
|
||||
{ "from": "Vive.LeftHandThumb2", "to": "Standard.LeftHandThumb2"},
|
||||
{ "from": "Vive.LeftHandThumb3", "to": "Standard.LeftHandThumb3"},
|
||||
{ "from": "Vive.LeftHandThumb4", "to": "Standard.LeftHandThumb4"},
|
||||
{ "from": "Vive.LeftHandIndex1", "to": "Standard.LeftHandIndex1"},
|
||||
{ "from": "Vive.LeftHandIndex2", "to": "Standard.LeftHandIndex2"},
|
||||
{ "from": "Vive.LeftHandIndex3", "to": "Standard.LeftHandIndex3"},
|
||||
{ "from": "Vive.LeftHandIndex4", "to": "Standard.LeftHandIndex4"},
|
||||
{ "from": "Vive.LeftHandMiddle1", "to": "Standard.LeftHandMiddle1"},
|
||||
{ "from": "Vive.LeftHandMiddle2", "to": "Standard.LeftHandMiddle2"},
|
||||
{ "from": "Vive.LeftHandMiddle3", "to": "Standard.LeftHandMiddle3"},
|
||||
{ "from": "Vive.LeftHandMiddle4", "to": "Standard.LeftHandMiddle4"},
|
||||
{ "from": "Vive.LeftHandRing1", "to": "Standard.LeftHandRing1"},
|
||||
{ "from": "Vive.LeftHandRing2", "to": "Standard.LeftHandRing2"},
|
||||
{ "from": "Vive.LeftHandRing3", "to": "Standard.LeftHandRing3"},
|
||||
{ "from": "Vive.LeftHandRing4", "to": "Standard.LeftHandRing4"},
|
||||
{ "from": "Vive.LeftHandPinky1", "to": "Standard.LeftHandPinky1"},
|
||||
{ "from": "Vive.LeftHandPinky2", "to": "Standard.LeftHandPinky2"},
|
||||
{ "from": "Vive.LeftHandPinky3", "to": "Standard.LeftHandPinky3"},
|
||||
{ "from": "Vive.LeftHandPinky4", "to": "Standard.LeftHandPinky4"},
|
||||
{ "from": "Vive.RightHand", "to": "Standard.RightHand" },
|
||||
{ "from": "Vive.RightHandThumb1", "to": "Standard.RightHandThumb1"},
|
||||
{ "from": "Vive.RightHandThumb2", "to": "Standard.RightHandThumb2"},
|
||||
{ "from": "Vive.RightHandThumb3", "to": "Standard.RightHandThumb3"},
|
||||
{ "from": "Vive.RightHandThumb4", "to": "Standard.RightHandThumb4"},
|
||||
{ "from": "Vive.RightHandIndex1", "to": "Standard.RightHandIndex1"},
|
||||
{ "from": "Vive.RightHandIndex2", "to": "Standard.RightHandIndex2"},
|
||||
{ "from": "Vive.RightHandIndex3", "to": "Standard.RightHandIndex3"},
|
||||
{ "from": "Vive.RightHandIndex4", "to": "Standard.RightHandIndex4"},
|
||||
{ "from": "Vive.RightHandMiddle1", "to": "Standard.RightHandMiddle1"},
|
||||
{ "from": "Vive.RightHandMiddle2", "to": "Standard.RightHandMiddle2"},
|
||||
{ "from": "Vive.RightHandMiddle3", "to": "Standard.RightHandMiddle3"},
|
||||
{ "from": "Vive.RightHandMiddle4", "to": "Standard.RightHandMiddle4"},
|
||||
{ "from": "Vive.RightHandRing1", "to": "Standard.RightHandRing1"},
|
||||
{ "from": "Vive.RightHandRing2", "to": "Standard.RightHandRing2"},
|
||||
{ "from": "Vive.RightHandRing3", "to": "Standard.RightHandRing3"},
|
||||
{ "from": "Vive.RightHandRing4", "to": "Standard.RightHandRing4"},
|
||||
{ "from": "Vive.RightHandPinky1", "to": "Standard.RightHandPinky1"},
|
||||
{ "from": "Vive.RightHandPinky2", "to": "Standard.RightHandPinky2"},
|
||||
{ "from": "Vive.RightHandPinky3", "to": "Standard.RightHandPinky3"},
|
||||
{ "from": "Vive.RightHandPinky4", "to": "Standard.RightHandPinky4"},
|
||||
{ "from": "Vive.Head", "to" : "Standard.Head" },
|
||||
{ "from": "Vive.LeftEye", "to" : "Standard.LeftEye" },
|
||||
{ "from": "Vive.RightEye", "to" : "Standard.RightEye" },
|
||||
|
||||
{ "from": "Vive.EyeBlink_L", "to" : "Standard.EyeBlink_L" },
|
||||
{ "from": "Vive.EyeBlink_R", "to" : "Standard.EyeBlink_R" },
|
||||
|
||||
{
|
||||
"from": "Vive.LeftFoot", "to" : "Standard.LeftFoot",
|
||||
"filters" : [{"type" : "exponentialSmoothing", "rotation" : 0.15, "translation": 0.15}]
|
||||
},
|
||||
{
|
||||
"from": "Vive.RightFoot", "to" : "Standard.RightFoot",
|
||||
"filters" : [{"type" : "exponentialSmoothing", "rotation" : 0.15, "translation": 0.15}]
|
||||
},
|
||||
{
|
||||
"from": "Vive.Hips", "to" : "Standard.Hips",
|
||||
"filters" : [{"type" : "exponentialSmoothing", "rotation" : 0.15, "translation": 0.15}]
|
||||
},
|
||||
{
|
||||
"from": "Vive.Spine2", "to" : "Standard.Spine2",
|
||||
"filters" : [{"type" : "exponentialSmoothing", "rotation" : 0.15, "translation": 0.15}]
|
||||
},
|
||||
{
|
||||
"from": "Vive.RightArm", "to" : "Standard.RightArm",
|
||||
"filters" : [{"type" : "exponentialSmoothing", "rotation" : 0.15, "translation": 0.15}]
|
||||
},
|
||||
{
|
||||
"from": "Vive.LeftArm", "to" : "Standard.LeftArm",
|
||||
"filters" : [{"type" : "exponentialSmoothing", "rotation" : 0.15, "translation": 0.15}]
|
||||
},
|
||||
|
||||
{ "from": "Vive.TrackedObject00", "to" : "Standard.TrackedObject00" },
|
||||
{ "from": "Vive.TrackedObject01", "to" : "Standard.TrackedObject01" },
|
||||
{ "from": "Vive.TrackedObject02", "to" : "Standard.TrackedObject02" },
|
||||
{ "from": "Vive.TrackedObject03", "to" : "Standard.TrackedObject03" },
|
||||
{ "from": "Vive.TrackedObject04", "to" : "Standard.TrackedObject04" },
|
||||
{ "from": "Vive.TrackedObject05", "to" : "Standard.TrackedObject05" },
|
||||
{ "from": "Vive.TrackedObject06", "to" : "Standard.TrackedObject06" },
|
||||
{ "from": "Vive.TrackedObject07", "to" : "Standard.TrackedObject07" },
|
||||
{ "from": "Vive.TrackedObject08", "to" : "Standard.TrackedObject08" },
|
||||
{ "from": "Vive.TrackedObject09", "to" : "Standard.TrackedObject09" },
|
||||
{ "from": "Vive.TrackedObject10", "to" : "Standard.TrackedObject10" },
|
||||
{ "from": "Vive.TrackedObject11", "to" : "Standard.TrackedObject11" },
|
||||
{ "from": "Vive.TrackedObject12", "to" : "Standard.TrackedObject12" },
|
||||
{ "from": "Vive.TrackedObject13", "to" : "Standard.TrackedObject13" },
|
||||
{ "from": "Vive.TrackedObject14", "to" : "Standard.TrackedObject14" },
|
||||
{ "from": "Vive.TrackedObject15", "to" : "Standard.TrackedObject15" }
|
||||
]
|
||||
}
|
|
@ -22,6 +22,7 @@ class InputConfiguration : public QObject, public Dependency {
|
|||
public:
|
||||
InputConfiguration();
|
||||
|
||||
// For OpenVR this returns headset name instead
|
||||
Q_INVOKABLE QStringList inputPlugins();
|
||||
Q_INVOKABLE QStringList activeInputPlugins();
|
||||
Q_INVOKABLE QString configurationLayout(QString pluginName);
|
||||
|
|
|
@ -2068,6 +2068,12 @@ controller::Input::NamedVector ViveControllerManager::InputDevice::getAvailableI
|
|||
}
|
||||
|
||||
QString ViveControllerManager::InputDevice::getDefaultMappingConfig() const {
|
||||
static const QString MAPPING_JSON = PathUtils::resourcesPath() + "/controllers/vive.json";
|
||||
QString name(getOpenVrDeviceName().c_str());
|
||||
QString MAPPING_JSON;
|
||||
if (name.contains(QString("Vive")) || name.contains(QString("Vive"))) {
|
||||
MAPPING_JSON = PathUtils::resourcesPath() + "/controllers/vive.json";
|
||||
} else {
|
||||
MAPPING_JSON = PathUtils::resourcesPath() + "/controllers/index.json";
|
||||
}
|
||||
return MAPPING_JSON;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue