Godot Version
4.2.1
Question
I’m a beginner with programming and Godot and I’m trying to make a coin pusher game in 3D and I got some basic stuff set up, but the physics collision detection seems very imprecise.
There are mainly 3 objects interacting.
- The floor, which is a StaticBody3D.
- The pusher, which is a RigidBody3D.
- The coins, which are also RigidBody3D’s.
All of them have a MeshInstance3D and a CollisionShape3D as child nodes.
The pusher goes back and forth because of an AnimationPlayer, which animates the MeshInstance3D and CollisionShape3D.
Pusher problems
What I don’t understand, is that coins are going into the mesh of the pusher. When they lay flat, a tiny bit goes in the mesh. But when they are standing up, the pusher always pushes the face of the coin that is the farthest from the pusher. So as the viewer, you can only see a flat circle on the pusher, until it goes backwards and the full coin becomes visible again.
When there are about 5 coins or more, the pusher only pushes a few coins, while other disappear into the mesh of the pusher.
Coin problems
What I also don’t understand, is why the coins can’t even really get pushed across the ‘bridge’ part. They bunch up together, slide into each other and don’t really seem to move after a certain time or after a certain amount of coins.
The front coins don’t really react to coins being pushed in from behind.
When there are a lot, and I mean A LOT, of coins in play, then a coin or two might make it across. But I don’t want it to be that many. And I want the coins to respond better to being pushed around.
What I tried and didn’t (seem to) help
With the RigidBody3D’s I tried:
- playing around with the roughness of the coins and pusher.
- turning Can Sleep Off and On
- turning Continuous Collision Detection On, under the Solver
- turning Max Contacts up
Under Project Settings, under Physics, 3D, I tried:
- turning up Solver Iterations
And under Project Settings, Physics, Jolt 3D, I tried:
- turning off sleep
- turning off Use Shape Margins
- turning up Movement Threshold
- turning down Max Penetration
Am I right in asking how I can make the collision detection more precise?
Or is there something else which can impact the response and reaction of the pusher and coins?
I have more screenshots, but as a new user I am only allowed one screenshot.
And these are close-ups: