Physic not working properly

Hi Community,
I’ve been working on a Coin Pusher App and i have some trouble with the physic behavior. The biggest problem ist that the coins are moving through the mover back wall and i don’t know why. I’ve tested many things out:

  • Physic setting to continous
  • Mesh Collider or Box collider(s)
  • Thickness

but i have alway the same issue. I’ve made a small video to show the settings and the behavior.
I’ve made the same Project with Unreal and everything is working fine here, but i want to use Unity because of the c# programming.
I’m using Unity 2017.1.0p2

Here is the video:

Thx forward!

I’d try using the Physics Debug Visualization for having a better view of what’s going on. Maybe you need to set up the colliders in a different way, or adjust how the coin rigidbodies go to sleep state.

Have you tried ‘Interpolate’ in the coin Rigidbody? They may be tunneling the thin collision wall.

Interpolate affects the visual coin only. You may be referring to Continuous Collision Detection, but that feature works with basic colliders only (sphere, box, capsule) and not with mesh colliders.

The easy-to-use hard-to-get-to-work Unity physics.

I’m not sure, but the object that comes in direct contact with the coins probably can’t be kinematic. My rough understanding of it is that when an rb is kinematic the engine calculates everything related to it as if it won’t ever move(even if it will). When you move your tray that is kinematic it doesn’t move the coins because the engine assumes the kinematic rb has always been in the new position, and that assumption occurs every physics step. Try to set things up in a way where your tray is not kinematic, and good luck with that by the way, because any kinematic rb that touches your tray from that point on can cause problems.

Also is it entirely possible that you will need to fiddle with friction and mass of your coins, because with 10 mass there may not be enough friction to “pull” the coins with the tray.

Check layers etc.