Merge pull request #52657 from timothyqiu/ik-target

Make sure IK target is inside tree before using its transform
This commit is contained in:
Rémi Verschelde 2021-09-14 13:41:14 +02:00 committed by GitHub
commit 0c66c990e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -542,7 +542,7 @@ Transform3D SkeletonIK3D::_get_target_transform() {
target_node_override = Object::cast_to<Node3D>(get_node(target_node_path_override));
}
if (target_node_override) {
if (target_node_override && target_node_override->is_inside_tree()) {
return target_node_override->get_global_transform();
} else {
return target;