Bullet hits player's 'whip attachment' but misses player may instantly cause damage on another actor returned by line of sight trace

Issue #290 resolved
Matt Hands created an issue

Problem is in ProcessTouch() function in bullet class, which is called when bullet hits a 'bullet whip attachment', which is the fairly large collision actor surrounding a player, used to detect passing bullets for the snap sound.

The player pawn itself doesn't detect hits. Instead, a hit on the whip attach runs a HitPointTrace to see if it actually hit the player. The trace handles the possible bullet snap sound and does a pretty accurate trace on the player pawn's body part hit points.

Problem is if the trace misses the player but hits another actor, the bullet instantly registers a hit on that actor and calls TakeDamage(). The hit is based on a line of sight trace and takes no account of ballistics, i.e. bullet drop, or flight time vs actor movement.

There's no need for this. The bullet won't keep hitting the whip attach, as that gets registered as the SavedTouchActor, preventing repeat execution of ProcessTouch(). Once a hit on a whip attach, without actually hitting the player, is detected, ProcessTouch() can simply exit & allow the bullet to fly on. Then if it's going to hit the other actor, it will in due course, based on flight time, movement and ballistics.

Causes a particular problem with vehicle bases (hulls), as the HitPointTrace seems to use the crude hull collision box. It ignores the vehicle's sophisticated collision static mesh that the bullet would normally use to detect collision (and will use if the bullet is allowed to fly on to its target).

Comments (1)

  1. Log in to comment