mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 13:00:26 +02:00
Add item throwing mechanics to VR configuration and input handling
- Introduced `vrCockpitItemThrow` configuration option to enable throwing items in VR. - Implemented `ThrowDetector` and `ThrowSequence` classes to manage item throwing mechanics based on hand movements. - Updated `OpenXRInput` to handle item throwing based on hand swings, integrating with existing VR input systems. - Enhanced settings overlay to allow users to toggle item throwing functionality. - Added tests for item throwing mechanics, ensuring correct behavior for various hand movements and conditions.
This commit is contained in:
1 parent
db30945f4c
commit
ebc97ef9ce
12 files changed
+701
-6
No files matched your search
@@ -196,6 +196,13 @@ class SettingsPage(
|
||||
write = { c, index -> c.setString("vr", "cockpit_item_hand", ITEM_HANDS[index]) },
|
||||
enabledIf = cockpit,
|
||||
)
|
||||
// runtime_config.h's kVrCockpitItemThrowDefault is on.
|
||||
toggle(
|
||||
R.string.vr_cockpit_item_throw, R.string.vr_cockpit_item_throw_helper,
|
||||
read = { it.bool("vr", "cockpit_item_throw") ?: true },
|
||||
write = { c, value -> c.setBool("vr", "cockpit_item_throw", value) },
|
||||
enabledIf = { c -> cockpit(c) && stringIndex(c, "vr", "cockpit_item_hand", ITEM_HANDS) != 2 },
|
||||
)
|
||||
// Tracked hands can show the item with stick steering as well.
|
||||
toggle(
|
||||
R.string.vr_hand_tracking, R.string.vr_hand_tracking_helper,
|
||||
|
||||
@@ -540,6 +540,8 @@
|
||||
<string name="vr_item_left">Left</string>
|
||||
<string name="vr_item_right">Right</string>
|
||||
<string name="vr_item_off">Off</string>
|
||||
<string name="vr_cockpit_item_throw">Throw the item by swinging</string>
|
||||
<string name="vr_cockpit_item_throw_helper">With that hand off the wheel, swing it quickly forward to throw the item ahead of the kart, or back to throw it behind, as the stick and item button would. Swinging while you hold the item button throws the item you are trailing.</string>
|
||||
<string name="vr_hand_tracking">Tracked hands</string>
|
||||
<string name="vr_hand_tracking_helper">The cockpit hands follow your own. Holding the controllers, the fingers follow their touch sensors; put one down and the cameras track that hand at once. Put the controllers down to drive with bare hands: close a hand on the wheel to hold it, which also holds the gas; pinch with a free hand to use an item; flick your hands up for a trick; pinch with your left palm facing you to pause. In menus, a right pinch is A. Choose Automatic drift. Needs hand tracking on in the headset\'s settings.</string>
|
||||
<string name="vr_lean_back">Lean back angle</string>
|
||||
|
||||
Reference in new issue
Block a user