I created a floor with custom geometry collision shape, and few rigid bodies.
I noticed that all bodies are vibrating while on floor, relative to gravity force (the stronger the gravity - the bigger the shake). If I disable gravity, or reduce it by a lot, vibrating stops (but then not enough gravity…).
Any idea what could be the problem and how to fix it?
This is how I create the bodies:
Maybe decrease friction and gravity? Unless your working on Jupiter or in inches or something that is far too large for a gravity vector on Earth at least.
How large is your scene, you just have the gravity vector?
@SirNate0 Thanks, already scaled down my scene it still shakes. Changing friction doesn’t change it.
@jmiller Thanks but I know all these stuff, already played with substeps, restitution and all that jazz. In fact, I tried every single public setter available and the only thing that affected the shaking was substep, but I was only able to make it worse…
As I mentioned, I switched to default gravity now.
OK solved! I don’t know if its undefined behavior and I did something silly or a bug, but I attached two custom collision shapes to the same node with a single rigid body (floor + walls), and while everything seemed to be working and collision was overall OK, it created the jittering. Note that the collision shapes were not actually on each other or anything, just sharing same node. + they were static (mass = 0). But I guess its still problematic.
I split it into separate nodes and now everything is smooth. Thank you all for the tips!