Physics constraint not... Constraining

Hi all!
I’m trying to make a very basic pinball game, and I need a “gate” for the ball, through which it can pass (without any real hinderance - i.e. I do not want it to slow down) but then not get back through.

I’ve set up a very basic physics constraint based wall, and it works, but if the ball has too much speed going back, it simply goes through it. There are simply too many settings for me to understand it properly but I feel like I’m missing something basic. Does anyone have any tips?
Any help is truly appreciated! :slight_smile:

This is the INTENDED result:

Enabling continuous collision detection, CCD, on the ball and gate might help. Unreal’s physics always seems a bit wonky though.

Hey there @ackehallgren! Welcome back to the community! So as Midi mentioned, this is less of a physics constraint issue and more of a collision detection issue. In game development, if an object is moving so fast that between ticks it moves through something, it technically never collided because there was no tick in which it actually made contact with the object. This can be fixed in a myriad of ways, many of them are limited by various mechanics.

So the first one I always recommend and that Midi already mentioned, is to enable CCD or Continuous Collision Detection, which will tighten up the physics collisions for all objects it’s on, however it’s not going to work if an object is still never making contact and it can be quite performance heavy if every single physics object runs it.

Next is widening the collision for the projectile or the thing it’s meant to collide with. I know you cannot widen your ball, but you may be able to widen your paddles in this case.

Another more complicated way it predictive collision, which is tracing where the ball is or has been and iterating what you need to ahead of time, however this is mostly used for projectiles and would be more painful in your use case.