From e0030c8bc5b6f29fe7f98bdac2c0590dabbe3299 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 11 May 2026 14:01:53 +0200 Subject: [PATCH] Apply scaling factor to NPC target radius calculations --- src/runtime-three/runtime-interaction-system.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/runtime-three/runtime-interaction-system.ts b/src/runtime-three/runtime-interaction-system.ts index 973fcd1e..5b154990 100644 --- a/src/runtime-three/runtime-interaction-system.ts +++ b/src/runtime-three/runtime-interaction-system.ts @@ -509,9 +509,14 @@ function getNpcHorizontalTargetRadius( ): number { switch (npc.collider.mode) { case "capsule": - return npc.collider.radius; + return npc.collider.radius * Math.max(npc.scale.x, npc.scale.z); case "box": - return Math.max(npc.collider.size.x, npc.collider.size.z) * 0.5; + return ( + Math.max( + npc.collider.size.x * npc.scale.x, + npc.collider.size.z * npc.scale.z + ) * 0.5 + ); case "none": return Math.max( bounds.max.x - bounds.min.x,