Scripting help

I am working on a stacking game. Spheres with rigid body fall from top and I use a paddle that move left and right to catch them. When the spheres hit the paddle or another spheres on the paddle, I make kinematic true for the sphere and make it child of the paddle.

This works nicely but I feel the stack is too rigid looking. If I can shake the stack when the paddle is moving and stop shaking after sometime when the paddle stopped moving, it will give a good dynamic unstable appearance to the stack.

One idea I am having is move the objects in the stack by layers as shown in the image.

10117-untitled-1.png

Can anyone provide some ideas how to do this? Is there a better idea to make this work?

I cannot use very complex logic because when the stack also gets bigger and bigger as the game is progressing.

Well, it won’t give the exact movement you have in your image, but you could try making the platform below the spheres a kinematic rigidbody and then moving it back and forth. This should treat the balls like if you were to actually jiggle a table.

Ctrl/Cmd + F for “Kinematic Rigidbodies” here and see if the examples would meet your needs.