Skip to content

Commit 94e6b94

Browse files
committed
Tweak mappings slightly se see if that gets mappings to work.
1 parent 1cca9a3 commit 94e6b94

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

driver/slimevr/resources/input/slimevr_controller_bindings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"click": true
7777
},
7878
"/input/trigger/value": { "type": "trigger" },
79-
"/input/trigger/touch": {
79+
"/input/trigger/click": {
8080
"type": "button",
8181
"touch": true
8282
},

driver/slimevr/resources/input/vrcompositor_bindings_slimevr.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,14 @@
187187
"chords": [
188188
{
189189
"inputs": [
190-
[ "/user/hand/left/input/system", "held" ],
190+
[ "/user/hand/left/input/system", "click" ],
191191
[ "/user/hand/left/input/trigger", "click" ]
192192
],
193193
"output": "/actions/system/in/TakeScreenshot"
194194
},
195195
{
196196
"inputs": [
197-
[ "/user/hand/right/input/system", "held" ],
197+
[ "/user/hand/right/input/system", "click" ],
198198
[ "/user/hand/right/input/trigger", "click" ]
199199
],
200200
"output": "/actions/system/in/TakeScreenshot"

src/TrackerDevice.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ void SlimeVRDriver::TrackerDevice::PositionMessage(messages::Position& position)
118118
void SlimeVRDriver::TrackerDevice::ControllerInputMessage(messages::ControllerInput& controllerInput) {
119119
// Get inputs from protobuf
120120
GetDriver()->GetInput()->UpdateScalarComponent(trigger_component_, controllerInput.trigger(), 0);
121+
GetDriver()->GetInput()->UpdateBooleanComponent(trigger_component_touch, controllerInput.trigger() > 0.5f, 0);
121122
GetDriver()->GetInput()->UpdateScalarComponent(grip_value_component_, controllerInput.grip(), 0);
122123
GetDriver()->GetInput()->UpdateScalarComponent(stick_x_component_, controllerInput.thumbstick_x(), 0);
123124
GetDriver()->GetInput()->UpdateScalarComponent(stick_y_component_, controllerInput.thumbstick_y(), 0);
@@ -269,15 +270,15 @@ vr::EVRInitError SlimeVRDriver::TrackerDevice::Activate(uint32_t unObjectId) {
269270
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/b/click", &this->button_b_component_);
270271
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/b/touch", &this->button_b_component_touch_);
271272
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/system/click", &this->system_component);
272-
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/system", &this->system_component);
273+
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/system", &this->system_component_chord);
273274
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/trackpad/click", &this->trackpad_click_component_);
274275
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/trackpad/touch", &this->trackpad_touch_component_);
275276
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/thumbstick/click", &this->stick_click_component_);
276277
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/thumbstick/touch", &this->stick_click_component_touch_);
277278

278279
// Scalar components
279280
GetDriver()->GetInput()->CreateScalarComponent(props, "/input/trigger/value", &this->trigger_component_, vr::VRScalarType_Absolute, vr::VRScalarUnits_NormalizedOneSided);
280-
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/trigger/touch", &this->trigger_component_touch_);
281+
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/trigger/click", &this->trigger_component_touch_);
281282
GetDriver()->GetInput()->CreateScalarComponent(props, "/input/grip/value", &this->grip_value_component_, vr::VRScalarType_Absolute, vr::VRScalarUnits_NormalizedOneSided);
282283
GetDriver()->GetInput()->CreateBooleanComponent(props, "/input/grip/touch", &this->grip_value_component_touch_);
283284
GetDriver()->GetInput()->CreateScalarComponent(props, "/input/trackpad/x", &this->trackpad_x_component_, vr::VRScalarType_Absolute, vr::VRScalarUnits_NormalizedTwoSided);

0 commit comments

Comments
 (0)