-
Video #1: The player (dynamic sphere of mass 100) will push objects of a lower mass (convex hull dynamic crate with a mass of 1) through triangle meshes. Aren't static triangle meshes supposed to have infinite mass and therefore the crate should favor clipping through the player sphere instead? Or is there a way to allow the player to stand on top of a crate with a mass lower than the player? stompdynamic.mp4Video #2: This shows some barrels (dynamic convex hull) with a mass of 200, while the player is a dynamic sphere of 100 mass. The player can now land and stand on top of the barrels (as desired), but there's some jitter to it.. both the player and the barrel clip inside other objects (between themselves and the triangle mesh) and slowly push themselves into the correct position. Is there a way to reduce that artifacting? stompdynamic2.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 15 replies
-
Iterative solvers (which is what Jolt uses) are not very good in 'high mass ratios' (where the top object is much heavier than the bottom one). An object that's 100x more heavy than another object will not work (a factor 10x is already a lot). There is no 'priority system' that decides to push 1 object over pushing another object. W.r.t. the barrel: I don't immediately see what could be going wrong. I'll need some sort of repro for that. |
Beta Was this translation helpful? Give feedback.
It looks like your inertia calculations are off. If in
LoadSnapshotTest::Initialize
I add:to the loop:
Then it starts behaving normally.
You can visualize the inertia in the samples app by hitting the 'I' key, without the change the inertia looks like that of a tiny box:
with the change it looks like a box that is about the same size as the barrel:
When you use an inertia that is too small, small impulses lead to big angular velocity changes so it continuously bounces back and forth between both sides of the barrel as is visible in your video. As a g…