Open and3rson opened 5 years ago
Can anyone still reproduce this bug in Godot 3.2.3 or any later release?
If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.
Godot version: v3.1-beta10
OS/device including version: ArchLinux rolling
Issue description: SoftBody pinned_points are out of sync with ArrayMesh vertexes because duplicate vertices are removed on physics server.
This is because in modules/bullet/soft_body_bullet.cpp:322, in
SoftBodyBullet::set_trimesh_body_shape
method, duplicate points are removed, thus making mesh indices out of sync with the indexes that pinned points store. Took me forever to find it.This makes setting
pinned_points
a real pain in the ass because you first need to remove duplicate vertices from mesh and then calculate new index of the vertex.This really should be documented somewhere. OR
vs_indices_to_physics_table
could be exposed to allow user to resolve soft body vertex index on physics server by specifying vertex index taken from ArrayMesh.Summoning @AndreaCatania :)