Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoftBody pinned point indices not corresponding to mesh vertices due to removal of duplicate mesh vertices #26611

Open
Tracked by #45333
and3rson opened this issue Mar 4, 2019 · 1 comment
Assignees
Milestone

Comments

@and3rson
Copy link
Contributor

and3rson commented Mar 4, 2019

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 :)

@and3rson and3rson changed the title SoftBody pinned point indices not corresponding to mesh vertices due to duplicate mesh vertices removal SoftBody pinned point indices not corresponding to mesh vertices due to removal of duplicate mesh vertices Mar 4, 2019
@akien-mga akien-mga added this to the 3.2 milestone Mar 4, 2019
@akien-mga akien-mga modified the milestones: 3.2, 4.0 Jan 14, 2020
@AndreaCatania AndreaCatania self-assigned this Feb 9, 2020
@KoBeWi
Copy link
Member

KoBeWi commented Dec 25, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants