Gamieon is a one-developer part-time studio focused on creating video games for the desktop and mobile platforms. Since 2010 Gamieon has developed and released six games as well as six more prototypes. Including beta distributions, Gamieon's products have netted a combined 300,000 downloads! Below this bio are images from all my games and prototypes. Check them out and don't forget to follow me on Twitter @[Gamieon](members:gamieon:321769)

Report RSS Keeping Unity Colliders Going Through Each Other: The Revenge

Posted by on

I released my Unity-based pinball game for both the iPhone and Android platforms some time ago, and in that release were a few bugs that players had to put up with. Before the release, the ball would frequently go through flippers and other things in the playfield. The best I could do to resolve the issue was ultimately to reduce the maximum velocity of the ball. The reason for that is increasing the number of physics steps, collision sensitivity, and other settings really hurt mobile performance. In the end, I made the release with the collision problem minimized but not absent, and players were generally happy despite the slow ball velocity.

After doing final testing for the PC version, and seeing both problems really ruin the game; I've finally reached the end of my rope. I'm within two weeks of the release (I hope), and needed to fix both problems NOW. Fortunately, this morning I found this post:

Stackoverflow.com

Some of the things suggested were things I had already done before, but here's what else I changed today:

  • Change Min Penetration for Penalty from 0.01 to 0.001
  • Increase Solver Iteration Count from 7 to 15
  • Reduced the mass of the ball from 0.1 to 0.004 to improve speed
  • Increased the flipper spring strength from 65,000 to 100,000 to improve speed

Consequently, I got the ball going fast again, and despite applying some big velocities, it never penetrated a static collider! Meanwhile, the performance of the game itself remained fast. Unfortunately, the ball would still sometimes go through the "ball guard," which is a bolt of lightning connecting the flippers designed to keep the ball from going down the drain. It's actually a rigidbody connected to each flipper with joints; the ball isn't supposed to pass through the body of course.

I hope I can find a fix for the ball guard; I'll make it a static object if I have to. It just won't look as cool...but a ball going through it looks even worse!

Check out my homepage and news feeds

And my projects!

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: