Before updating to Windows 10 you may need to return your Pro license. More information here

Pinball, Sphere and gravity, hitting sphere off the table

Hi there.

To get me started in Unity I have created a simple pinball game, with two paddles using a hinge joint and the in-built physics engine.

They work, the can hit the sphere around the table, however sometimes the sphere will fly off the table once struck with the paddles.

Here is what I have tried, adjusting mass of sphere, gravity on the X,Y axis (both currently set to -12), mass of the paddles. Usually changing one of these adversely effects another such as the speed of the sphere, or the power of the paddles to hit the sphere.

Any suggestions on how I can resolve this would be excellent.


more ▼

asked Mar 22, 2011 at 10:51 AM

avatar image

9 12 8 14

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Could you just put a plane on top of the machine facing down so that you can still see in but the ball can't fly out.


Could you freeze the position of the rigidbody on the y axis under it's inspector properties? Not sure how your tables laid out.

more ▼

answered Mar 22, 2011 at 11:50 AM

avatar image

2.8k 37 37 67

Hi there thanks for the reply, I was thinking I could add a plane over the top, and chances are that I will, but the sphere still has issues, i.e doesn't roll down the table fast enough, or speed when struck by the paddle, I know the latter issue is going to be something to do with torque on the paddle. I tried to freeze position on the Y axis, but because of the table layout, no dice thanks for the suggestion.

Mar 22, 2011 at 12:30 PM Sisyphus

In the end, I just put a non rendered cube over the top, with rigid body, did job, thanks.

Mar 22, 2011 at 06:08 PM Sisyphus

try raising the local force added by the paddles, that should give you a bit more acceleration. You can put a collider on the none rendered box instead of a rigidbody then unity doesnt need to process the physics of the rigidbody (even though it's static) Also turn down the angular drag or tilt the table down a bit more in order to get the ball to roll down the table faster.

Mar 22, 2011 at 06:38 PM AngryOldMan
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments



asked: Mar 22, 2011 at 10:51 AM

Seen: 1541 times

Last Updated: Mar 22, 2011 at 10:51 AM