Merge pull request #52657 from timothyqiu/ik-target
Make sure IK target is inside tree before using its transform
This commit is contained in:
commit
0c66c990e7
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue