Physical Animation Trace Collision Bug

I’ve encountered a bug when I activate Physical Animation, it seems to mess up the collision for line traces. Here is the [link][1] to a recording of the bug I made. I shoot by pressing the LMB and using a Multi Line Trace to see if we hit anything. Starting at 0:12 you can clearly see the line trace is hitting air(where there is no collision) slightly to the right of the character’s left arm. The line trace isn’t hitting the capsule component because the line trace is set to ignore Pawn collision. I can also tell the trace is hitting the character mesh when we are shooting air because the Hit Info returns the Hit Bone. Another oddity you can see is at 0:48. The trace is ignoring the left arm’s collision and is hitting the torso, even though the arm’s collision is the first thing it should hit.

The first time I shoot the character, this code is ran.

Then this is ran immediately after the above code.

The character mesh’s collision.

And here is the line trace’s settings.

Here is a [2nd video][6] that shows the trace’s collision freaking out when we activate physical animation on the character mesh. The code is slightly altered in this 2nd video. The main differences are the physical animation is turned off after 0.7 seconds and the Blend Weight is updated every frame. In the video, you can see I shoot the character and then immediately shoot a 2nd time before the physical animation has ended. This 2nd shot just goes straight through the character, but it should hit the character. The 2nd shot ignores all collision above the waist, but if I shoot below the waist, the trace will hit the legs. This could have something to do with me applying physical animation to everything above the waist (the physical animation starts at spine_02).

I don’t know if this will help but I should note that each body part (legs, torso/arms, and head) are all separate meshes. The Torso/arms and head use the legs as a Master Bone Component and only the legs have a physics asset (the physics asset has collision for the entire body).

[Here is the code][7] for the 2nd video that is applicable to the physical animation.

Hi drb1992,

Do you get this same behavior with the Mannequin from the Third Person Template project? So far I have been unable to get your results but our setup could differ. Could you provide a small test project so I can investigate this further?

Yes, I tried it with the Mannequin and had the same behavior. I’m unable to reproduce the bug in a fresh project, so I migrated a part of the project I’m working on to a fresh project. There is a link to download the project down below.

The important blueprints are…
RangeContent/Base/Blueprints/Range_Pawn.uasset and
RangeContent/Gameplay/Blueprints/NPC/NPC.uasset

When you press LMB, the Shoot event is called in Range_Pawn.
If the shot hits an NPC, the Hit event is called for that NPC.

Download Project

I can see the shooting event trigger on click but there isn’t a line trace or hit event. Is there something I’m missing to get the repro to work?

The line trace is called in the Shoot function(highlighted) in Range_Pawn.

And the Hit event is in the NPC blueprint. The Hit Reaction event (which I highlighted) in the NPC is where the physics animation code is called.

You should be able to see the bug in action by hitting Play and shooting the character’s left arm. You have to time your 2nd shot after the initial shot to reproduce the bug. I’ve found shooting a 2nd time near the end (0.7 seconds) of the physics animation to consistently reproduce the bug.