OnHit collision Bug

How to check if something is currently not colliding?

The only solution seems to be Bind Event to OnHit but that doesn’t work out.

So On Hit event I set my IsColliding bool variable to true, then there is a retriggerable delay with 0.05 seconds after which it sets the bool to false. Really simple but it doesn’t work.

Sometimes I still have the bool false even though the object is colliding, I now that for sure because I set everything off including collision and set it to the location where the bool last was false and I see the object being inside the other object.

I’m using physics simulation where the component that is physics animated has the OnHit event check while it collides with simple world collisions. I’m using a physics constraint with it but that shouldn’t matter.

Hi Davision,

You mention seeing that you are inside of the other object, does this mean your collision is set to overlap?

If you are using overlap you can use something like this. Keep in mind I’m only using Tick for testing purposes.

That doesn’t work, I get not overlapping at all. Probably because overlap doesn’t work when the target is colliding.

I basically push my physical physics object in front of me, so when I push it enough it can be pushed into stuff for a frame or something and sometimes it gets pushed really inside objects. The bug is that even though it is colliding and it is pushed inside another colliding object the OnHit Event is not triggering.

One thing I thought could be causing the bug is a hardcoded event retrigger delay that is not visible. I remember there were retrigger delays for OnHit events in the UDK that you could change but there is nothing in UE4 for it.