From 63a2fcdaa4a124ce80199c3cb79075ec7be9bc74 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 29 Sep 2026 20:20:06 +0200 Subject: [PATCH] Guided projectile: only the simulation's detonation shows an explosion The overshoot branch of GuidedProjectile.Update (out of range, or flown past its target) instantiated HitEffect whatever the simulation had decided. A round the simulation never detonated could therefore explode on screen. The branch now fades the round out; Resolve stays the one place a HitEffect is shown for a detonation. Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/Gameplay/Weapons/GuidedProjectile.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/Gameplay/Weapons/GuidedProjectile.cs b/Assets/Scripts/Gameplay/Weapons/GuidedProjectile.cs index db2a8674d..c66ede374 100644 --- a/Assets/Scripts/Gameplay/Weapons/GuidedProjectile.cs +++ b/Assets/Scripts/Gameplay/Weapons/GuidedProjectile.cs @@ -134,14 +134,11 @@ public class GuidedProjectile : MonoBehaviour var targetDist = diff.magnitude; var sourceDist = length(StartPosition.xz - position.xz); + // Out of range, or flown past its target: the round falls away. Only the simulation's detonation + // (Resolve) shows an explosion; a round that merely ran out of flight has none. if (sourceDist > Range || dot(diff.ToCultMath(), Velocity.ToCultMath()) < 0) { StartCoroutine(FadeOut()); - if (HitEffect != null) - { - var ht = HitEffect.Instantiate(); - ht.position = t.position; - } return; } _prevDist = targetDist;