@@ -100,6 +100,9 @@ InputStateStatic::InputStateStatic(const XrInstance& instance, const XrSession&
100
100
mThumbClickAction = CreateAction (mActionSet , XR_ACTION_TYPE_BOOLEAN_INPUT, " thumb_click" ,
101
101
nullptr , 2 , handSubactionPaths);
102
102
103
+ mThumbRestTouchAction = CreateAction (mActionSet , XR_ACTION_TYPE_BOOLEAN_INPUT, " thumbresttouch" ,
104
+ nullptr , 2 , handSubactionPaths);
105
+
103
106
mSqueezeTriggerAction = CreateAction (mActionSet , XR_ACTION_TYPE_BOOLEAN_INPUT,
104
107
" squeeze_trigger" , nullptr , 2 , handSubactionPaths);
105
108
@@ -141,6 +144,11 @@ InputStateStatic::InputStateStatic(const XrInstance& instance, const XrSession&
141
144
bindings.push_back (ActionSuggestedBinding (instance, mThumbClickAction ,
142
145
" /user/hand/left/input/thumbstick/click" ));
143
146
147
+ bindings.push_back (ActionSuggestedBinding (instance, mThumbRestTouchAction ,
148
+ " /user/hand/left/input/thumbrest/touch" ));
149
+ bindings.push_back (ActionSuggestedBinding (instance, mThumbRestTouchAction ,
150
+ " /user/hand/right/input/thumbrest/touch" ));
151
+
144
152
bindings.push_back (ActionSuggestedBinding (instance, mSqueezeTriggerAction ,
145
153
" /user/hand/right/input/squeeze/value" ));
146
154
bindings.push_back (ActionSuggestedBinding (instance, mSqueezeTriggerAction ,
@@ -176,6 +184,7 @@ InputStateStatic::~InputStateStatic() {
176
184
OXR (xrDestroyAction (mHandPoseAction ));
177
185
OXR (xrDestroyAction (mThumbStickAction ));
178
186
OXR (xrDestroyAction (mThumbClickAction ));
187
+ OXR (xrDestroyAction (mThumbRestTouchAction ));
179
188
OXR (xrDestroyAction (mSqueezeTriggerAction ));
180
189
181
190
if (mLeftHandSpace != XR_NULL_HANDLE) {
@@ -248,6 +257,12 @@ void InputStateFrame::SyncButtonsAndThumbSticks(
248
257
mThumbStickClickState [RIGHT_CONTROLLER] = SyncButtonState (
249
258
session, staticState->mThumbClickAction , staticState->mRightHandSubactionPath );
250
259
260
+ // Sync thumbrest touch states
261
+ mThumbrestTouchState [LEFT_CONTROLLER] = SyncButtonState (
262
+ session, staticState->mThumbRestTouchAction , staticState->mLeftHandSubactionPath );
263
+ mThumbrestTouchState [RIGHT_CONTROLLER] = SyncButtonState (
264
+ session, staticState->mThumbRestTouchAction , staticState->mRightHandSubactionPath );
265
+
251
266
// Sync index trigger states
252
267
mIndexTriggerState [LEFT_CONTROLLER] = SyncButtonState (
253
268
session, staticState->mLeftHandIndexTriggerAction , staticState->mLeftHandSubactionPath );
0 commit comments