Is it possible to prevent overlap but detect collision?

I have a scenario in which a physics-enabled object (let’s call it Cube 1) falls onto a static object (Cube 2). I want to detect when Cube 1 hits Cube 2 so I can perform some logic at that moment. However, I don’t want Cube 1 to fall through Cube 2.

Setting collisions to BlockAll on the static mesh fixes the visual issue, but stops overlap events from firing.
cubes1

Conversely, setting them to OverlapAll causes events to fire, but the cubes visually fall right through each other (and, in fact, the terrain itself) and keep going.
cubes2

Fiddling around with custom collision settings generally results in one or the other. At one point I managed to get them to stop falling through the terrain at least, but I don’t recall which magic combination of settings did the trick.

Is there a good way to detecting when the cubes touch but without allowing them to clip through each other visually?

It’s called:

1 Like

I have a breakpoint set on Event Hit already. If I block collisions, the event never fires. If I allow overlap, the event fires, but the blocks fall through.

The collision is then set up incorrectly. Set Block All (for now), follow the instructions in the tooltip.

If I allow overlap, the event fires

Hit Events do not fire on overlap - so you have something dodgy going on there.

I see. I didn’t have “Simulation Generates Hit Events” enabled. Now it works. Thanks!

1 Like