1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-01 16:38:31 +00:00
Files
godot/modules/jolt_physics/objects
Jorrit Rouwe 6141e1dcc8 Jolt Physics: Remove sharing shared soft body settings from SoftBody3D
Since the soft body meshes are always copied before simulation, the shared map never actually shared data with anything. This also makes it possible to create the mesh in local space the 2nd time it gets added to a space.

This fixes the following 2 problems:
* Inertia calculation becomes inaccurate when the vertices are far away from the origin. This triggered a harmless assert on 2nd insert.
* The pressure calculations become inaccurate when the vertices are far away from the origin. Since we update the soft body position to the center of mass of all vertices at the end of every physics update, this problem lasted only for a single frame after reinserting and could cause a little jolt.
2025-11-11 21:19:48 +01:00
..