Archive 17/01/2023.

Box physics are broken?

niansa

So I am trying to figure out physics…



I attached a collision shape to the floor (Box) as well as to that object that I enabled gravity for and set mass to 1.
However, that object tends to fall through the floor but usually just floats above not even laying flat.

Does anyone have an idea how to solve that problem? I tried everything but seems like my knowledge isn’t high enough lol!

Edit: Seems like the problem only occurs if the object below

niansa

… uses trianglemesh for collision shape.

(The editor did not let me edit the message)

Modanung

That might be part of the problem: Triangle meshes are only supposed to be used for stationary objects. Things that move around should use basic shapes or convex hulls.
You might also want to add some friction and play with the rest thresholds and damping factors. And personally, I like my big G closer to 17 than 9.81; looks more natural to me.

niansa

I mean like, the object that moves around is just a box but the environment is a triangle mesh.

Modanung

Ah, so that’s fine.

Could you share a screenshot showing all RigidBody attributes?

Modanung

CollisionShapes also have a margin, btw, with a default value of 0.04. So it’s normal for them to not fully touch. You can either reduce the margin, or take it into account by reducing the shape’s size.

The gap might indeed be 0.08.