From bb05a4b6cb0d5ac17803e40450382d835e5d53af Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 25 Apr 2026 16:04:21 +0200 Subject: [PATCH] Standardize targeting acquisition range by replacing complex reach multipliers with a fixed acquisition distance --- src/runtime-three/runtime-interaction-system.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/runtime-three/runtime-interaction-system.ts b/src/runtime-three/runtime-interaction-system.ts index f341f506..a89b8246 100644 --- a/src/runtime-three/runtime-interaction-system.ts +++ b/src/runtime-three/runtime-interaction-system.ts @@ -20,10 +20,7 @@ import type { const DEFAULT_INTERACTABLE_TARGET_RADIUS = 0.75; const DEFAULT_NPC_DIALOGUE_TARGET_RADIUS = 1.5; -const TARGETING_INTERACTABLE_REACH_MULTIPLIER = 3.5; -const TARGETING_NPC_REACH_MULTIPLIER = 4.5; -const TARGETING_MIN_INTERACTABLE_REACH = 5.5; -const TARGETING_MIN_NPC_REACH = 7; +const TARGETING_ACQUISITION_REACH = 15; const TARGETING_MIN_VIEW_DOT = 0.1; export interface RuntimeDialogueStartSource { @@ -493,10 +490,7 @@ function collectRuntimeInteractionTargetSources( const distance = distanceBetweenVec3(interactionOrigin, interactable.position); const acquisitionRange = options.useTargetingReach - ? Math.max( - interactable.radius * TARGETING_INTERACTABLE_REACH_MULTIPLIER, - TARGETING_MIN_INTERACTABLE_REACH - ) + ? TARGETING_ACQUISITION_REACH : interactable.radius; if (distance > acquisitionRange) { @@ -530,10 +524,7 @@ function collectRuntimeInteractionTargetSources( const bounds = getNpcDialogueTargetBounds(npc); const distance = distanceToAxisAlignedBox(interactionOrigin, bounds); const acquisitionRange = options.useTargetingReach - ? Math.max( - bounds.range * TARGETING_NPC_REACH_MULTIPLIER, - TARGETING_MIN_NPC_REACH - ) + ? TARGETING_ACQUISITION_REACH : bounds.range; if (distance > acquisitionRange) {