Chain Reaction: Rigidbody that pushes rigidbody that pushes other rigidbody

Hello everybody,

I’m trying to make a “medal game” in Unity. You can see on this video what I’m calling a “medal game”: 1.
You can find a description on Wikipedia here in “Pusher game type” section.
The aim is to add coins/medals to push others to you.
Here is a picture:

alt text

So I have medals that have rigid body, and a block, that also has a rigidbody, that pushes medals. This block moves forward and backward with the MovePosition method of the rigidbody.

Problem is that this block correctly pushes medals that are on its way, but these medals don’t push other medals that could be also on their way. Medals just merge each other.

Screenshots:

I add medals on the game

15235-1.png

Medals are pushed and merge with other medals without pushing them. Nothing moves. No chain reactions.

15236-2.png

My solution

I found one trick. For now, I add a script on medals. When a medal enters in collision with an other medal (“OnCollisionEnter”), I add a Fixed Joint component and link these two medals. I remove the component in “OnCollisionExit” method. Now it works.

I don’t know if it is the best way or I missed something with Unity. Someone has any idea?

Finally, a friend helped me to find the solution.
It may seem stupid but the problem was the scaling. Indeed, the medals/coins was too small so collision didn’t work. By increasing the scale, everything is perfect.
I don’t know why but now it’s good !