mirror of
https://github.com/godotengine/godot.git
synced 2025-04-13 01:00:35 +08:00
Merge pull request #46919 from nekomatata/soft-body-gizmo-fix
Fix pinned vertices in SoftBody editor gizmo
This commit is contained in:
commit
0e3aae00d8
@ -2073,7 +2073,13 @@ void SoftBody3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
|
||||
Ref<TriangleMesh> tm = soft_body->get_mesh()->generate_triangle_mesh();
|
||||
|
||||
Vector<Vector3> points;
|
||||
soft_body->get_mesh()->generate_debug_mesh_indices(points);
|
||||
for (int i = 0; i < soft_body->get_mesh()->get_surface_count(); i++) {
|
||||
Array arrays = soft_body->get_mesh()->surface_get_arrays(i);
|
||||
ERR_CONTINUE(arrays.is_empty());
|
||||
|
||||
const Vector<Vector3> &vertices = arrays[Mesh::ARRAY_VERTEX];
|
||||
points.append_array(vertices);
|
||||
}
|
||||
|
||||
Ref<Material> material = get_material("shape_material", p_gizmo);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user