From 83c66e27d53b5b9a288f949febd07df00b5eaa9d Mon Sep 17 00:00:00 2001 From: BoroBongo Date: Tue, 24 Nov 2026 15:28:42 +0000 Subject: [PATCH 1/2] feat: the favorites ring opens and closes by holding both empty hands above the head for 1.5 s - no triggers (the backpack may stay in a hand) Co-Authored-By: Claude Opus 5.5 --- .../Localizations/Gothic-UI_de.asset | 14 +++--- .../Localizations/Gothic-UI_en.asset | 14 +++--- .../Adapters/Player/VRFavoritesRing.cs | 2 +- .../Domain/Player/VrFavoritesGestureDomain.cs | 47 +++++++++++++------ .../Services/Context/VRContextMenuService.cs | 2 +- Assets/Gothic-VR/Scripts/VRConstants.cs | 6 +-- .../2026-11-24-favorites-ring-raise-hands.md | 19 ++++++++ 7 files changed, 71 insertions(+), 33 deletions(-) create mode 100644 Docs/adr/2026-11-24-favorites-ring-raise-hands.md diff --git a/Assets/Gothic-Core/Localizations/Gothic-UI_de.asset b/Assets/Gothic-Core/Localizations/Gothic-UI_de.asset index 8daf4c595..58a52b200 100644 --- a/Assets/Gothic-Core/Localizations/Gothic-UI_de.asset +++ b/Assets/Gothic-Core/Localizations/Gothic-UI_de.asset @@ -506,7 +506,7 @@ MonoBehaviour: m_Metadata: m_Items: [] - m_Id: 193347490894176264 - m_Localized: "Beide leeren H\xE4nde \xFCber den Kopf + beide Trigger: Favoriten-Ring" + m_Localized: "Beide leeren H\xE4nde 1,5 s \xFCber den Kopf: Favoriten-Ring" m_Metadata: m_Items: [] - m_Id: 193347490894176265 @@ -562,7 +562,7 @@ MonoBehaviour: m_Localized: "Projektilzauber: die leere Hand h\xE4lt ihren Trigger, ausholen und loslassen zum Werfen. H\xE4ltst du den Trigger der Runenhand und zeigst auf einen Gegner, wird er anvisiert. Zauber w\xE4hlst du im Favoriten-Ring: - beide leeren H\xE4nde \xFCber den Kopf, beide Trigger halten." + beide leeren H\xE4nde 1,5 s \xFCber den Kopf halten." m_Metadata: m_Items: [] - m_Id: 193347490894176277 @@ -588,11 +588,11 @@ MonoBehaviour: m_Metadata: m_Items: [] - m_Id: 193531983462522882 - m_Localized: "Beide leeren H\xE4nde \xFCber den Kopf heben und kurz beide Trigger - halten: der Ring \xF6ffnet oder schlie\xDFt sich. Greifen nimmt einen Zauber - (bereit zum Wirken), eine Waffe oder einen Gegenstand in die Hand. L\xE4sst - du einen Gegenstand an einem Platz los, kommt er hinein. Abschalten unter Immersion: - \"Favoriten-Ring\"." + m_Localized: "Beide leeren, offenen H\xE4nde 1,5 s \xFCber den Kopf halten (es + vibriert): der Ring \xF6ffnet oder schlie\xDFt sich. Der Rucksack darf in einer + Hand bleiben. Greifen nimmt einen Zauber (bereit zum Wirken), eine Waffe oder + einen Gegenstand in die Hand. L\xE4sst du einen Gegenstand an einem Platz los, + kommt er hinein. Abschalten unter Immersion: \"Favoriten-Ring\"." m_Metadata: m_Items: [] references: diff --git a/Assets/Gothic-Core/Localizations/Gothic-UI_en.asset b/Assets/Gothic-Core/Localizations/Gothic-UI_en.asset index 418df7bd8..b496298a8 100644 --- a/Assets/Gothic-Core/Localizations/Gothic-UI_en.asset +++ b/Assets/Gothic-Core/Localizations/Gothic-UI_en.asset @@ -519,7 +519,7 @@ MonoBehaviour: m_Metadata: m_Items: [] - m_Id: 193347490894176264 - m_Localized: 'Both empty hands above your head + both triggers: favorites ring' + m_Localized: 'Both empty hands above your head for 1.5 s: favorites ring' m_Metadata: m_Items: [] - m_Id: 193347490894176265 @@ -574,8 +574,8 @@ MonoBehaviour: - m_Id: 193347490894176276 m_Localized: 'Projectile spells: the empty hand holds its trigger, swing and let go to throw. Hold the rune hand''s trigger and point at an enemy to lock - on. Choose spells in the favorites ring: both empty hands above your head, - hold both triggers.' + on. Choose spells in the favorites ring: hold both empty hands above your head + for 1.5 s.' m_Metadata: m_Items: [] - m_Id: 193347490894176277 @@ -601,10 +601,10 @@ MonoBehaviour: m_Metadata: m_Items: [] - m_Id: 193531983462522882 - m_Localized: 'Raise both empty hands above your head and hold both triggers for - a moment: the ring opens or closes. Grip takes a spell (ready to cast), a weapon - or an item into your hand. Let go of an item at a slot to put it in. Switch - it off in Immersion: "Favorites ring".' + m_Localized: 'Hold both empty, open hands above your head for 1.5 s (it vibrates): + the ring opens or closes. The backpack may stay in one hand. Grip takes a spell + (ready to cast), a weapon or an item into your hand. Let go of an item at a + slot to put it in. Switch it off in Immersion: "Favorites ring".' m_Metadata: m_Items: [] references: diff --git a/Assets/Gothic-VR/Scripts/Adapters/Player/VRFavoritesRing.cs b/Assets/Gothic-VR/Scripts/Adapters/Player/VRFavoritesRing.cs index 2c593046a..f840328f1 100644 --- a/Assets/Gothic-VR/Scripts/Adapters/Player/VRFavoritesRing.cs +++ b/Assets/Gothic-VR/Scripts/Adapters/Player/VRFavoritesRing.cs @@ -34,7 +34,7 @@ namespace Gothic.VR.Adapters.Player /// selection (hold the magic key, the equipped runes/scrolls circle the hero) in VR, plus the equipped weapons, /// favorite items and the money. What it holds and the put-in rules are VrFavoritesService's; this shows it and /// handles the hands. Its slot visuals are VRFavoritesRingSlotViews. - /// - Open/close: both hands empty and raised above the head, both triggers held (VrFavoritesGestureDomain). + /// - Open/close: both empty, open hands raised above the head for 1.5 s (VrFavoritesGestureDomain). /// Loading a game closes it. /// - A carousel around the player at eye level, the slot looked at selected: at most 8 spells; the /// equipped melee weapon and bow/crossbow (Gothic's one of each); up to 3 favorite items (a torch, a key, potions, food) and the trade currency diff --git a/Assets/Gothic-VR/Scripts/Domain/Player/VrFavoritesGestureDomain.cs b/Assets/Gothic-VR/Scripts/Domain/Player/VrFavoritesGestureDomain.cs index 33cd57049..7858c398a 100644 --- a/Assets/Gothic-VR/Scripts/Domain/Player/VrFavoritesGestureDomain.cs +++ b/Assets/Gothic-VR/Scripts/Domain/Player/VrFavoritesGestureDomain.cs @@ -1,3 +1,4 @@ +using Gothic.VR.Adapters.Player; using Gothic.VR.Interaction.Models; using Gothic.VR.Interaction.Ports; using Gothic.VR.Services; @@ -8,14 +9,13 @@ namespace Gothic.VR.Domain.Player { /// - /// The favorites ring's open/close gesture, owned by VrFavoritesService: both hands empty and above the eyes, both - /// triggers held for GestureSeconds (a haptic tick per third). The triggers have to be let go before the next - /// toggle. + /// The favorites ring's open/close gesture, owned by VrFavoritesService: both hands empty, open (no grip - climbing + /// a ledge grips it) and above the eyes for GestureSeconds, a haptic tick per third. A hand holding the backpack + /// counts as empty, like before (open the ring to put an item in quickly). No button: holding both triggers up + /// there felt like forever. The hands have to come down before the next toggle. /// public class VrFavoritesGestureDomain { - - [Inject] private readonly VRPlayerService _vrPlayerService; [Inject] private readonly IVrInput _vrInput; [Inject] private readonly VrHapticsService _hapticsService; @@ -34,17 +34,17 @@ public bool Tick(Transform head, bool isBlocked) { var left = _vrPlayerService.GetHandModelGo(VrHandSide.Left); var right = _vrPlayerService.GetHandModelGo(VrHandSide.Right); - var leftTrigger = _vrInput.GetButton(VrHandSide.Left, VrButton.Trigger).IsActive; - var rightTrigger = _vrInput.GetButton(VrHandSide.Right, VrButton.Trigger).IsActive; + var areHandsUp = head != null && left != null && right != null && + left.transform.position.y > head.position.y + RingConstants.GestureHeightAboveEyes && + right.transform.position.y > head.position.y + RingConstants.GestureHeightAboveEyes; - if (!leftTrigger || !rightTrigger) + // After a toggle the hands have to come down first - else the ring would flip every GestureSeconds. + if (!areHandsUp) _isGestureLatched = false; - var isGesture = head != null && left != null && right != null && leftTrigger && rightTrigger && + var isGesture = areHandsUp && !isBlocked && _vrPlayerService.GrabbedItemLeft == null && _vrPlayerService.GrabbedItemRight == null && - left.transform.position.y > head.position.y + RingConstants.GestureHeightAboveEyes && - right.transform.position.y > head.position.y + RingConstants.GestureHeightAboveEyes && - !isBlocked; + IsHandOpen(VrHandSide.Left) && IsHandOpen(VrHandSide.Right); if (_isGestureLatched) { _gestureTime = 0f; @@ -52,8 +52,7 @@ public bool Tick(Transform head, bool isBlocked) return false; } - // A hand dipping below the eyes or a trigger flickering for a moment - // doesn't start the hold again - it took much longer than GestureSeconds. + // A hand dipping below the eyes for a moment doesn't start the hold again. if (!isGesture) { _gestureBrokenTime += Time.deltaTime; @@ -84,5 +83,25 @@ public bool Tick(Transform head, bool isBlocked) _hapticsService.Vibrate(VrHandSide.Right, VrHapticPreset.Success); return true; } + + /// + /// No grip, or the grip holds the backpack. + /// + private bool IsHandOpen(VrHandSide side) + { + if (!_vrInput.GetButton(side, VrButton.Grip).IsActive) + return true; + + var rig = _vrPlayerService.Rig; + if (rig == null) + return false; + foreach (var hand in rig.HandGrabbers) + { + if (hand.HandSide == side && hand.Held != null && + hand.Held.GetComponentInParent() != null) + return true; + } + return false; + } } } diff --git a/Assets/Gothic-VR/Scripts/Services/Context/VRContextMenuService.cs b/Assets/Gothic-VR/Scripts/Services/Context/VRContextMenuService.cs index 519fa7535..1a557b4a2 100644 --- a/Assets/Gothic-VR/Scripts/Services/Context/VRContextMenuService.cs +++ b/Assets/Gothic-VR/Scripts/Services/Context/VRContextMenuService.cs @@ -161,7 +161,7 @@ public void UpdateMainMenu(AbstractMenuInstance mainMenu) rows.Add((CreateToggleLabel(gameMenu, "THROWABLE_SPELLS", "throwableSpells"), CreateToggleChoice(gameMenu, "THROWABLE_SPELLS", VRConstants.IniNames.ThrowableSpells, VRConstants.ThrowableSpellsDefaultValue))); - // Off = the favorites ring (both hands up, both triggers) doesn't open. + // Off = the favorites ring (both empty hands up for 1.5 s) doesn't open. rows.Add((CreateToggleLabel(gameMenu, "FAVORITES_RING", "favoritesRing"), CreateToggleChoice(gameMenu, "FAVORITES_RING", VRConstants.IniNames.FavoritesRing, VRConstants.FavoritesRingDefaultValue))); diff --git a/Assets/Gothic-VR/Scripts/VRConstants.cs b/Assets/Gothic-VR/Scripts/VRConstants.cs index f102d56a8..fac151e9d 100644 --- a/Assets/Gothic-VR/Scripts/VRConstants.cs +++ b/Assets/Gothic-VR/Scripts/VRConstants.cs @@ -44,7 +44,7 @@ public static class IniNames public const string ScrollsSingleUse = "scrollsSingleUse"; // 1 = projectile spells (firebolt, ...) are thrown with a swing (default), 0 = they are cast like other spells. public const string ThrowableSpells = "throwableSpells"; - // 1 = the favorites ring opens with the gesture (both hands up, both triggers), 0 = off. + // 1 = the favorites ring opens with the gesture (both empty hands up for 1.5 s), 0 = off. public const string FavoritesRing = "favoritesRing"; // 1 = G2: sneaking, NPCs whose pickpocket dialog option would show carry a purse; grabbing it is that // option (default), 0 = G2 only has the dialog. G1's purse is the engine's steal window, always on. @@ -335,8 +335,8 @@ public static class FavoritesRing // Meters the hands must be above the eyes for the gesture. public const float GestureHeightAboveEyes = 0.1f; - // Seconds both triggers are held for the open/close gesture. - public const float GestureSeconds = 1f; + // Seconds both empty, open hands are held up for the open/close gesture (no button). + public const float GestureSeconds = 1.5f; // A broken gesture shorter than this (s) keeps the hold time. public const float GestureGraceSeconds = 0.3f; diff --git a/Docs/adr/2026-11-24-favorites-ring-raise-hands.md b/Docs/adr/2026-11-24-favorites-ring-raise-hands.md new file mode 100644 index 000000000..00581c517 --- /dev/null +++ b/Docs/adr/2026-11-24-favorites-ring-raise-hands.md @@ -0,0 +1,19 @@ +# ADR: The favorites ring opens by raising the hands, no buttons + +- Date: 2026-11-24 +- Replaces: decision 1 of [VR favorites ring](2026-11-03-vr-favorites-ring.md) +- Technical details: VrFavoritesGestureDomain and VRConstants.FavoritesRing (VR) + +## Context + +The ring opened with both empty hands above the head while both triggers were held. In a playtest video the player stood with raised arms for a long time before the ring came - holding two triggers up there is awkward, and a gesture that takes that long breaks the flow of a fight. + +## Decisions + +1. **Raising both empty, open hands above the head for 1.5 s opens or closes the ring.** No button is needed. The controllers vibrate three times while it builds up and once more when the ring opens or closes. +2. **The hands have to come down before the next toggle,** so arms kept up don't flip the ring every 1.5 s. +3. **A gripping hand doesn't count, except when it holds the backpack.** Climbing a ledge grips it, and a hand holding a weapon or item isn't empty; the backpack may stay in a hand like before, so an item goes into the favorites quickly. Not chosen: keeping a button, which was the slow part. + +## Consequences + +- Raising both empty hands without gripping anything for 1.5 s - stretching, waving - opens the ring. Players who don't want it switch the ring off in Immersion ("Favorites ring"). From 4ab0095498ceefd2a26b18617a145f9bcbb5eb13 Mon Sep 17 00:00:00 2001 From: BoroBongo Date: Tue, 24 Nov 2026 15:33:05 +0000 Subject: [PATCH 2/2] fix: the favorites ring gesture keeps both triggers and needs only 0.5 s (was 1 s) - the button-free 1.5 s version was slower Co-Authored-By: Claude Opus 5.5 --- .../Localizations/Gothic-UI_de.asset | 14 +++--- .../Localizations/Gothic-UI_en.asset | 14 +++--- .../Adapters/Player/VRFavoritesRing.cs | 2 +- .../Domain/Player/VrFavoritesGestureDomain.cs | 46 ++++++------------- .../Services/Context/VRContextMenuService.cs | 2 +- Assets/Gothic-VR/Scripts/VRConstants.cs | 8 ++-- Docs/adr/2026-11-24-favorites-ring-faster.md | 17 +++++++ .../2026-11-24-favorites-ring-raise-hands.md | 19 -------- 8 files changed, 50 insertions(+), 72 deletions(-) create mode 100644 Docs/adr/2026-11-24-favorites-ring-faster.md delete mode 100644 Docs/adr/2026-11-24-favorites-ring-raise-hands.md diff --git a/Assets/Gothic-Core/Localizations/Gothic-UI_de.asset b/Assets/Gothic-Core/Localizations/Gothic-UI_de.asset index 58a52b200..8daf4c595 100644 --- a/Assets/Gothic-Core/Localizations/Gothic-UI_de.asset +++ b/Assets/Gothic-Core/Localizations/Gothic-UI_de.asset @@ -506,7 +506,7 @@ MonoBehaviour: m_Metadata: m_Items: [] - m_Id: 193347490894176264 - m_Localized: "Beide leeren H\xE4nde 1,5 s \xFCber den Kopf: Favoriten-Ring" + m_Localized: "Beide leeren H\xE4nde \xFCber den Kopf + beide Trigger: Favoriten-Ring" m_Metadata: m_Items: [] - m_Id: 193347490894176265 @@ -562,7 +562,7 @@ MonoBehaviour: m_Localized: "Projektilzauber: die leere Hand h\xE4lt ihren Trigger, ausholen und loslassen zum Werfen. H\xE4ltst du den Trigger der Runenhand und zeigst auf einen Gegner, wird er anvisiert. Zauber w\xE4hlst du im Favoriten-Ring: - beide leeren H\xE4nde 1,5 s \xFCber den Kopf halten." + beide leeren H\xE4nde \xFCber den Kopf, beide Trigger halten." m_Metadata: m_Items: [] - m_Id: 193347490894176277 @@ -588,11 +588,11 @@ MonoBehaviour: m_Metadata: m_Items: [] - m_Id: 193531983462522882 - m_Localized: "Beide leeren, offenen H\xE4nde 1,5 s \xFCber den Kopf halten (es - vibriert): der Ring \xF6ffnet oder schlie\xDFt sich. Der Rucksack darf in einer - Hand bleiben. Greifen nimmt einen Zauber (bereit zum Wirken), eine Waffe oder - einen Gegenstand in die Hand. L\xE4sst du einen Gegenstand an einem Platz los, - kommt er hinein. Abschalten unter Immersion: \"Favoriten-Ring\"." + m_Localized: "Beide leeren H\xE4nde \xFCber den Kopf heben und kurz beide Trigger + halten: der Ring \xF6ffnet oder schlie\xDFt sich. Greifen nimmt einen Zauber + (bereit zum Wirken), eine Waffe oder einen Gegenstand in die Hand. L\xE4sst + du einen Gegenstand an einem Platz los, kommt er hinein. Abschalten unter Immersion: + \"Favoriten-Ring\"." m_Metadata: m_Items: [] references: diff --git a/Assets/Gothic-Core/Localizations/Gothic-UI_en.asset b/Assets/Gothic-Core/Localizations/Gothic-UI_en.asset index b496298a8..418df7bd8 100644 --- a/Assets/Gothic-Core/Localizations/Gothic-UI_en.asset +++ b/Assets/Gothic-Core/Localizations/Gothic-UI_en.asset @@ -519,7 +519,7 @@ MonoBehaviour: m_Metadata: m_Items: [] - m_Id: 193347490894176264 - m_Localized: 'Both empty hands above your head for 1.5 s: favorites ring' + m_Localized: 'Both empty hands above your head + both triggers: favorites ring' m_Metadata: m_Items: [] - m_Id: 193347490894176265 @@ -574,8 +574,8 @@ MonoBehaviour: - m_Id: 193347490894176276 m_Localized: 'Projectile spells: the empty hand holds its trigger, swing and let go to throw. Hold the rune hand''s trigger and point at an enemy to lock - on. Choose spells in the favorites ring: hold both empty hands above your head - for 1.5 s.' + on. Choose spells in the favorites ring: both empty hands above your head, + hold both triggers.' m_Metadata: m_Items: [] - m_Id: 193347490894176277 @@ -601,10 +601,10 @@ MonoBehaviour: m_Metadata: m_Items: [] - m_Id: 193531983462522882 - m_Localized: 'Hold both empty, open hands above your head for 1.5 s (it vibrates): - the ring opens or closes. The backpack may stay in one hand. Grip takes a spell - (ready to cast), a weapon or an item into your hand. Let go of an item at a - slot to put it in. Switch it off in Immersion: "Favorites ring".' + m_Localized: 'Raise both empty hands above your head and hold both triggers for + a moment: the ring opens or closes. Grip takes a spell (ready to cast), a weapon + or an item into your hand. Let go of an item at a slot to put it in. Switch + it off in Immersion: "Favorites ring".' m_Metadata: m_Items: [] references: diff --git a/Assets/Gothic-VR/Scripts/Adapters/Player/VRFavoritesRing.cs b/Assets/Gothic-VR/Scripts/Adapters/Player/VRFavoritesRing.cs index f840328f1..2c593046a 100644 --- a/Assets/Gothic-VR/Scripts/Adapters/Player/VRFavoritesRing.cs +++ b/Assets/Gothic-VR/Scripts/Adapters/Player/VRFavoritesRing.cs @@ -34,7 +34,7 @@ namespace Gothic.VR.Adapters.Player /// selection (hold the magic key, the equipped runes/scrolls circle the hero) in VR, plus the equipped weapons, /// favorite items and the money. What it holds and the put-in rules are VrFavoritesService's; this shows it and /// handles the hands. Its slot visuals are VRFavoritesRingSlotViews. - /// - Open/close: both empty, open hands raised above the head for 1.5 s (VrFavoritesGestureDomain). + /// - Open/close: both hands empty and raised above the head, both triggers held (VrFavoritesGestureDomain). /// Loading a game closes it. /// - A carousel around the player at eye level, the slot looked at selected: at most 8 spells; the /// equipped melee weapon and bow/crossbow (Gothic's one of each); up to 3 favorite items (a torch, a key, potions, food) and the trade currency diff --git a/Assets/Gothic-VR/Scripts/Domain/Player/VrFavoritesGestureDomain.cs b/Assets/Gothic-VR/Scripts/Domain/Player/VrFavoritesGestureDomain.cs index 7858c398a..c03a9cd91 100644 --- a/Assets/Gothic-VR/Scripts/Domain/Player/VrFavoritesGestureDomain.cs +++ b/Assets/Gothic-VR/Scripts/Domain/Player/VrFavoritesGestureDomain.cs @@ -1,4 +1,3 @@ -using Gothic.VR.Adapters.Player; using Gothic.VR.Interaction.Models; using Gothic.VR.Interaction.Ports; using Gothic.VR.Services; @@ -9,13 +8,14 @@ namespace Gothic.VR.Domain.Player { /// - /// The favorites ring's open/close gesture, owned by VrFavoritesService: both hands empty, open (no grip - climbing - /// a ledge grips it) and above the eyes for GestureSeconds, a haptic tick per third. A hand holding the backpack - /// counts as empty, like before (open the ring to put an item in quickly). No button: holding both triggers up - /// there felt like forever. The hands have to come down before the next toggle. + /// The favorites ring's open/close gesture, owned by VrFavoritesService: both hands empty and above the eyes, both + /// triggers held for GestureSeconds (a haptic tick per third). The triggers have to be let go before the next + /// toggle. /// public class VrFavoritesGestureDomain { + + [Inject] private readonly VRPlayerService _vrPlayerService; [Inject] private readonly IVrInput _vrInput; [Inject] private readonly VrHapticsService _hapticsService; @@ -34,17 +34,17 @@ public bool Tick(Transform head, bool isBlocked) { var left = _vrPlayerService.GetHandModelGo(VrHandSide.Left); var right = _vrPlayerService.GetHandModelGo(VrHandSide.Right); - var areHandsUp = head != null && left != null && right != null && - left.transform.position.y > head.position.y + RingConstants.GestureHeightAboveEyes && - right.transform.position.y > head.position.y + RingConstants.GestureHeightAboveEyes; + var leftTrigger = _vrInput.GetButton(VrHandSide.Left, VrButton.Trigger).IsActive; + var rightTrigger = _vrInput.GetButton(VrHandSide.Right, VrButton.Trigger).IsActive; - // After a toggle the hands have to come down first - else the ring would flip every GestureSeconds. - if (!areHandsUp) + if (!leftTrigger || !rightTrigger) _isGestureLatched = false; - var isGesture = areHandsUp && !isBlocked && + var isGesture = head != null && left != null && right != null && leftTrigger && rightTrigger && _vrPlayerService.GrabbedItemLeft == null && _vrPlayerService.GrabbedItemRight == null && - IsHandOpen(VrHandSide.Left) && IsHandOpen(VrHandSide.Right); + left.transform.position.y > head.position.y + RingConstants.GestureHeightAboveEyes && + right.transform.position.y > head.position.y + RingConstants.GestureHeightAboveEyes && + !isBlocked; if (_isGestureLatched) { _gestureTime = 0f; @@ -52,7 +52,7 @@ public bool Tick(Transform head, bool isBlocked) return false; } - // A hand dipping below the eyes for a moment doesn't start the hold again. + // A hand dipping below the eyes or a trigger flickering for a moment doesn't start the hold again. if (!isGesture) { _gestureBrokenTime += Time.deltaTime; @@ -83,25 +83,5 @@ public bool Tick(Transform head, bool isBlocked) _hapticsService.Vibrate(VrHandSide.Right, VrHapticPreset.Success); return true; } - - /// - /// No grip, or the grip holds the backpack. - /// - private bool IsHandOpen(VrHandSide side) - { - if (!_vrInput.GetButton(side, VrButton.Grip).IsActive) - return true; - - var rig = _vrPlayerService.Rig; - if (rig == null) - return false; - foreach (var hand in rig.HandGrabbers) - { - if (hand.HandSide == side && hand.Held != null && - hand.Held.GetComponentInParent() != null) - return true; - } - return false; - } } } diff --git a/Assets/Gothic-VR/Scripts/Services/Context/VRContextMenuService.cs b/Assets/Gothic-VR/Scripts/Services/Context/VRContextMenuService.cs index 1a557b4a2..519fa7535 100644 --- a/Assets/Gothic-VR/Scripts/Services/Context/VRContextMenuService.cs +++ b/Assets/Gothic-VR/Scripts/Services/Context/VRContextMenuService.cs @@ -161,7 +161,7 @@ public void UpdateMainMenu(AbstractMenuInstance mainMenu) rows.Add((CreateToggleLabel(gameMenu, "THROWABLE_SPELLS", "throwableSpells"), CreateToggleChoice(gameMenu, "THROWABLE_SPELLS", VRConstants.IniNames.ThrowableSpells, VRConstants.ThrowableSpellsDefaultValue))); - // Off = the favorites ring (both empty hands up for 1.5 s) doesn't open. + // Off = the favorites ring (both hands up, both triggers) doesn't open. rows.Add((CreateToggleLabel(gameMenu, "FAVORITES_RING", "favoritesRing"), CreateToggleChoice(gameMenu, "FAVORITES_RING", VRConstants.IniNames.FavoritesRing, VRConstants.FavoritesRingDefaultValue))); diff --git a/Assets/Gothic-VR/Scripts/VRConstants.cs b/Assets/Gothic-VR/Scripts/VRConstants.cs index fac151e9d..ce02d6b1b 100644 --- a/Assets/Gothic-VR/Scripts/VRConstants.cs +++ b/Assets/Gothic-VR/Scripts/VRConstants.cs @@ -44,7 +44,7 @@ public static class IniNames public const string ScrollsSingleUse = "scrollsSingleUse"; // 1 = projectile spells (firebolt, ...) are thrown with a swing (default), 0 = they are cast like other spells. public const string ThrowableSpells = "throwableSpells"; - // 1 = the favorites ring opens with the gesture (both empty hands up for 1.5 s), 0 = off. + // 1 = the favorites ring opens with the gesture (both hands up, both triggers), 0 = off. public const string FavoritesRing = "favoritesRing"; // 1 = G2: sneaking, NPCs whose pickpocket dialog option would show carry a purse; grabbing it is that // option (default), 0 = G2 only has the dialog. G1's purse is the engine's steal window, always on. @@ -335,11 +335,11 @@ public static class FavoritesRing // Meters the hands must be above the eyes for the gesture. public const float GestureHeightAboveEyes = 0.1f; - // Seconds both empty, open hands are held up for the open/close gesture (no button). - public const float GestureSeconds = 1.5f; + // Seconds both triggers are held for the open/close gesture. 1 s felt long with the arms up. + public const float GestureSeconds = 0.5f; // A broken gesture shorter than this (s) keeps the hold time. - public const float GestureGraceSeconds = 0.3f; + public const float GestureGraceSeconds = 0.2f; // Seconds the front spell rests before its effect preview shows. public const float PreviewSeconds = 1f; diff --git a/Docs/adr/2026-11-24-favorites-ring-faster.md b/Docs/adr/2026-11-24-favorites-ring-faster.md new file mode 100644 index 000000000..cc7707629 --- /dev/null +++ b/Docs/adr/2026-11-24-favorites-ring-faster.md @@ -0,0 +1,17 @@ +# ADR: The favorites ring opens after half a second + +- Date: 2026-11-24 +- Replaces: decision 1 of [VR favorites ring](2026-11-03-vr-favorites-ring.md) +- Technical details: VrFavoritesGestureDomain and VRConstants.FavoritesRing (VR) + +## Context + +The ring opened with both empty hands above the head while both triggers were held for 1 s. In a playtest video the player stood with raised arms for a long time before the ring came - in a fight that breaks the flow. + +## Decisions + +1. **Both empty hands above the head and both triggers held for 0.5 s open or close the ring.** The rest stays: the controllers vibrate while it builds up and once more when the ring opens or closes, the triggers have to be let go before the next toggle, the backpack may stay in a hand. Not chosen: dropping the triggers (raising the hands to stretch or climb would open the ring). + +## Consequences + +- A hand dipping below the eyes or a trigger flickering keeps the hold time for 0.2 s (was 0.3 s), a fair part of the shorter hold. diff --git a/Docs/adr/2026-11-24-favorites-ring-raise-hands.md b/Docs/adr/2026-11-24-favorites-ring-raise-hands.md deleted file mode 100644 index 00581c517..000000000 --- a/Docs/adr/2026-11-24-favorites-ring-raise-hands.md +++ /dev/null @@ -1,19 +0,0 @@ -# ADR: The favorites ring opens by raising the hands, no buttons - -- Date: 2026-11-24 -- Replaces: decision 1 of [VR favorites ring](2026-11-03-vr-favorites-ring.md) -- Technical details: VrFavoritesGestureDomain and VRConstants.FavoritesRing (VR) - -## Context - -The ring opened with both empty hands above the head while both triggers were held. In a playtest video the player stood with raised arms for a long time before the ring came - holding two triggers up there is awkward, and a gesture that takes that long breaks the flow of a fight. - -## Decisions - -1. **Raising both empty, open hands above the head for 1.5 s opens or closes the ring.** No button is needed. The controllers vibrate three times while it builds up and once more when the ring opens or closes. -2. **The hands have to come down before the next toggle,** so arms kept up don't flip the ring every 1.5 s. -3. **A gripping hand doesn't count, except when it holds the backpack.** Climbing a ledge grips it, and a hand holding a weapon or item isn't empty; the backpack may stay in a hand like before, so an item goes into the favorites quickly. Not chosen: keeping a button, which was the slow part. - -## Consequences - -- Raising both empty hands without gripping anything for 1.5 s - stretching, waving - opens the ring. Players who don't want it switch the ring off in Immersion ("Favorites ring").