Collision hit events are unreliable until physics simulation has been enabled

Hit events on world static or world dynamic actors that have not had physics simulation enabled on them in the past seem to be somewhat unreliable. Collisions against them will fire events as long as there is no other actor also colliding with the pawn in the same tick otherwise only one hit event will be fired.

Once physics simulation is enabled(and optionally disabled and reset to default static BlockAll) collisions will reliably fire events on and for all colliding actors.

I’ve created a short video to highlight the inconsistency. You should see the template physics ball pawn colliding with some static mesh actors. Hit events create arrows from the hit location in the direction of the hit normal and scaled by the hit impulse. Rolling causes continuous small arrows, strong collisions large arrows.

In the first part there are a number of obvious collisions that do not fire hit events. After enabling simulation on the static mesh actors and then disabling it again, collisions are very reliable.

Video: UE4 Collision Bug

Steps:

  1. Load the rolling ball template.
  2. Set up a hit event to fire on the the ball pawn.
  3. Set up some hit events for some of the static cube obstacles in the level blueprint.
  4. A - D

A. Roll the pawn into walls.

  • Hit events are missed for most or all wall hits.

B. Jump into the walls.

  • Hits are recorded.

C. Drop / Jump from a high location to the ground.

  • Some hit events are missed until bouncing stops.

D. Roll along the length of a wall colliding with both the floor and the wall.

  • Hit events are called for either the wall or the floor. Not both.

Part 2

  1. Enable physics simulation on one or more walls/floors/obstacles.
  2. Disable physics simulation on the same.
  3. Set the collision preference back to BlockAll preset.
  4. Perform A - D again. Hit events are always fired when expected on the previously simulating actors.

Hey ,

Good find! I’ve reported this issue internally.

Thanks,

Jonathan

Any chance you could find the tracking id for this? I noticed it was still present in 4.5 so I wanted to watch for anything hitting github master branch.

It’s not really blocking, just interested.

Great, thanks Jonathan.

Sure! The TTP# for this one is 346757.

This seems to be fixed in in github master and slated for 4.7. I believe it was CL 2367497 that did it, though I didn’t bother to isolate the change to verify it.

Hi James, can you give us link to this commit please? https://github.com/EpicGames/UnrealEngine/commits/master
“CL 2367497” tells me nothing.

Thanks in advance

Pierdek

Sorry about that, I thought I included the SHA-1.

https://github.com/EpicGames/UnrealEngine/commit/6c63296fd4c6b11e19b01fbdb5cb0dd1fd0d3db0

So, the same issue is in:

UPrimitiveComponent::SetCollisionProfileName

?

I did some checking on this… Seems like it was fixed sometime before the commit I suggested. 4.6 binary and it seems good, so I’m not sure when it happened. I guess I should update my sources more often.