-
We have a few extremely large objects in the game (like planets and moons, the maximum coordinate is 2e8) where building a ConvexHullShape fails with this error: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 11 replies
-
I never tested Jolt with these extreme values. Are these hulls (roughly) centered around 0? You could indeed try to create a smaller hull and then scale it up, but with objects of this size, you may run into other issues in the simulation later (there are a number of 'epsilons' in the code and not all of them are exposed). If you give me the points that you're giving to the hull builder I can take a look if I can see what the issue in the builder is. |
Beta Was this translation helpful? Give feedback.
-
Interesting hull you have, it's a nearly flat disc with 4337 points with an interesting pattern in it: The main thing that fails is that the points are just far enough apart in the Y direction that the 'is this a 2D hull?' check thinks that it is a 3D hull. Then it tries to build a 3D hull but, because all points are nearly coplanar, and because there are so many of them, the hull building fails due to floating point precision problems. Scaling the hull down doesn't help because it's still nearly but not quite co-planar. If I set the Y coordinate of all points to the same value, the hull building succeeds because then it goes through the 2D path. I'm wondering if this hull is the intended hull (to me it looks like this is supposed to be a planet but maybe accidentally squashed to 2d)? |
Beta Was this translation helpful? Give feedback.
Interesting hull you have, it's a nearly flat disc with 4337 points with an interesting pattern in it:
The main thing that fails is that the points are just far enough apart in the Y direction that the 'is this a 2D hull?' check thinks that it is a 3D hull. Then it tries to build a 3D hull but, because all points are nearly coplanar, and because there are so many of them, the hull building fails due to floating point precision problems.
Scaling the hull down doesn't help because it's still nearly but not quite co-planar. If I set the Y coordinate of all points to the same value, the hull building succeeds because then it goes through the 2D path.
I'm wondering if this hull is the intende…