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:
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
Medals are pushed and merge with other medals without pushing them. Nothing moves. No chain reactions.
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?