I’m new to unreal engine, and I’m learning how to build a game. So far I decided to build a pinball, very basic, just to learn how to import models, create class blueprint and pretty much basic things.
I manage most of things I needed, but, I get a really big problem using collisions in unreal.
I have that physic ball that is working pretty much as I want, my left and right triggers are correctly mapped to my controller, everything is colliding, but at a point the ball jump behind or go through my triggers, specially if I kick the ball quickly (let’s say 30 degres in half a frame). You can imagine it’s a big problem for a pinball game…
Could someone help me to figure it out, like having solutions for a perfect collider (I’ve tried custom meshes for collision, even with larger volume than needed).
Does unreal have any kind of substeps regarding the physic engin ?
How would you build this situation if you had to do a pinball game ?
Many thanks, and sorry if I’be posted my request in the wrong part of the forum.
Try enabling Use CCD in the Collision Settings for your ball and paddles. You can find this setting if you click the arrow at the bottom of the Collision Settings to expand the section. It’s possible you’re having difficulty with collision because the Actors are colliding too quickly, and this setting will make the collision detection much more accurate.
Hope that helps!
Thanks a lot for your message, it’s working when I activat CCD on my ball and panels, but I need to run the game with 16 substeps, it’s fine for now, but I still have little penetrations issues when I kick the ball from the tip of my panels, I’ll try to make my collision meshes thicker, and probably add another mesh inside but offsetted from my panel to have a “security collider”.
Hopefully I’ll be able to kick that ball from any points of my panels.
Many thanks !
Glad that helped!
You mention still having penetration on the tips of your panels (I’m guessing you mean the left and right flippers?). You can see collision boxes in your viewport if you click Show > Collision. A trick I use to see how my collision is working is to Play, get the game set up to just before the collision in question, hit Pause and then Eject, then go through it frame by frame. This lets me see the collision boxes and watch the actual impact. Seeing the problem up close like that might help you figure out what you need to change to get it working the way you want.