Is there a way to draw the collisions surface of PhysicsShape?
I am receiving the warning Non uniform scaling is unsupported for sphere shapes. Setting the radius to the biggest bounding box extent. I think I understand where it’s coming from and probably this is the reason why I see some oddities. But to make sure that this is exactly the reason and not something else I would love to see the borders of collision surfaces.
Quick side question. My guess of the reason of oddities was correct.
Under defined circumstances I intentionally collapse the mesh using bone animation, so visually my mesh becomes smaller, but the physics body remains the same in size.
How can I adjust the physics body? Both options will work 1) automatic reshaping around new visible mesh size and 2) manual adjusment of the sphere in terms of size and offset.
Some final notes.
I noticed that my initial issue wasn’t related to PhysicsShape, but to mesh bounding info. Bounding info is not updated when mesh is deformed using skeleton bones. This line actually solved my original issue: mesh.refreshBoundingInfo(true);.
Keep in mind, that refreshBoundingInfo method is very expensive and should not be used continously. Maybe only on final frames or on just a few key frames.
I will accept Cedric answer as a solution, because it is the closest to the original question that is stated in the header.
Hmm, for some reason computeAsync method computes the new bounding box completely wrong. It makes the new box significantly bigger than the initial box, while the actual mesh collapses. To show an example I will need to actually import my mesh into the playground. I may do that later, but for now I’ll stick to mesh.refreshBoundingInfo(true); since it computes accurate for me.