Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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** 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. alt text

The character mesh's collision. alt text

And here is the line trace's settings. alt text

Here is a **2nd video** 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 for the 2nd video that is applicable to the physical animation.

Product Version: UE 4.18
img-01.png (273.0 kB)
img-02.png (199.9 kB)
img-03.png (45.5 kB)
img-04.png (149.1 kB)
img-05.png (225.8 kB)
more ▼

asked Dec 27 '17 at 12:16 PM in Blueprint Scripting

avatar image

253 7 22 30

avatar image TJ V ♦♦ STAFF Jan 02 '18 at 02:15 PM

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?

avatar image drb1992 Jan 03 '18 at 01:01 PM

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

avatar image TJ V ♦♦ STAFF Jan 03 '18 at 04:16 PM

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?

avatar image drb1992 Jan 03 '18 at 04:41 PM

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

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. alt text

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.

shoot-function.png (331.4 kB)
hit.png (450.6 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question