mirror of
https://github.com/godotengine/godot.git
synced 2024-11-11 14:43:44 +00:00
Merge pull request #47151 from nekomatata/soft-body-attachment-error
Fix spamming errors when SoftBody pinned nodes have no attachment
This commit is contained in:
commit
67dc067970
@ -768,7 +768,9 @@ void SoftBody3D::_reset_points_offsets() {
|
||||
PinnedPoint *w = pinned_points.ptrw();
|
||||
for (int i = pinned_points.size() - 1; 0 <= i; --i) {
|
||||
if (!r[i].spatial_attachment) {
|
||||
w[i].spatial_attachment = Object::cast_to<Node3D>(get_node(r[i].spatial_attachment_path));
|
||||
if (!r[i].spatial_attachment_path.is_empty() && has_node(r[i].spatial_attachment_path)) {
|
||||
w[i].spatial_attachment = Object::cast_to<Node3D>(get_node(r[i].spatial_attachment_path));
|
||||
}
|
||||
}
|
||||
|
||||
if (!r[i].spatial_attachment) {
|
||||
|
Loading…
Reference in New Issue
Block a user