- Home /
How to make moving objects stack, without sliding over each other?
I know there have been many questions about moving platforms, but this one is different. None of the solutions have worked for me.
So, I have a coin pusher game (like the game 'Coin Dozer'). The coins will drop down into the machine, and they are pushed around. However, every time a coin lands on top of another coin, they do not 'stack'. They slide on each other and have no friction.
Now, I've tried everything. Physic materials and friction, creating fixed joints on collisions, parenting objects on collisions, rigidbody velocity, etc. But nothing seems to make the coins 'stick' together (like in a real coin machine). I made the coins become children of the 'pusher', when they collide with it. So the coins stick to the pusher object and move backwards and forwards. But any coin that does NOT touch the pusher will slide over all the moving coins and remain stationary. This has been very frustrating!
Essentially, the coins have no friction against each other. Coins cannot rest on top of other moving coins. My coin pusher will have large numbers of these coins moving around. When I play coin dozer, coins seem to stack and move accurately! They don't slide over each other. It is not a Unity game, however. But it shows realistic friction is possible in games.
How can I make the coins behave realistically?
You could have colliders that are jagged and distorted? Just make a cylinder in blender and randomize the vertices around by small amounts so it looks like the surface of a potato chip or something.
Try not to make it too high poly as you will need a convex collider.
Your answer
Follow this Question
Related Questions
Object always falling off moving platform 2 Answers
How can I change friction of a Physic material in script? 1 Answer
Realistic player movement? 2 Answers
Angular Friction 0 Answers