Skip to main content

Search

How do I prevent a ball (moveable) to get stuck or go thru a wall with enough speed (obstacle non moveable or moveable).

  • CLOUD1985

    I could be wrong but I think this comes from the logic in the game updating at 30 FPS combined with the physical scale of the objects involved.

    If your objects are small enough that at speed they pass through each other in under a single frame then the collision is missed.

    I'd suggest scaling everything up to a larger size & using max physics settings if possible & see if that helps.

    Also if you can work out the speed at which you start to see problems you could use this speed value to selectively activate a laser scope on the ball that points in the direction of movement to help detect collisions before they happen.

  • popeye98800

    Thank you for your suggestion, CLOUD1985. I’ll try it, but for a pinball game the ball physic is more accurate if the scale is around the real thing... Maybe I can mitigate between scale and ball reaction to obstacles.

  • TAPgiles

    If you use the actual physics engine to collide and such, then that will be the most stable you can get and will not be affected by the 30fps logic framerate.

    There will still be times when it's moving crazy fast and it doesn't pick up that it should have collided--emphasis on *crazy fast*!!

    To fix this normally you could have a thicker wall. This may not work for things like a flipper which is thin though. So maybe detect if the ball is on one side of the flipper and power a collider on the other side of the flipper to make it thicker--stuff like that?

Please sign in to leave a comment.