mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 09:00:28 +02:00
Take item pinches only from a mostly open hand
- Now that holding the wheel engages the race controls, closing the other hand on the rim could bring thumb and index together on the way and fire an item. A pinch uses an item only while the hand's grasp is under 0.5; a relaxed hand reads about 0, a hand closed on a rim about 0.9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d3ad9fbd56
commit
38b7f89d74
4 files changed
+19
-4
No files matched your search
@@ -214,6 +214,15 @@ private:
|
||||
bool m_blocked = false;
|
||||
};
|
||||
|
||||
// A pinch uses an item only from a hand still mostly open: a hand closing on
|
||||
// the rim can bring thumb and index together on the way, and a fist is not a
|
||||
// pinch.
|
||||
inline constexpr float kItemPinchMaxGrasp = 0.5f;
|
||||
|
||||
inline bool ItemPinch(bool pinch, float grasp) noexcept {
|
||||
return pinch && IsFinite(grasp) && grasp < kItemPinchMaxGrasp;
|
||||
}
|
||||
|
||||
// A hand's pinch and menu gesture this frame. The runtime's own recognition
|
||||
// (XR_FB_hand_tracking_aim) is preferred when it is valid, and a pinch made
|
||||
// while the hand is in the system gesture (palm towards the face) is the menu
|
||||
|
||||
Reference in new issue
Block a user