Make sure IK target is inside tree before using its transform
(cherry picked from commit 88e3ba83f0
)
This commit is contained in:
parent
e46d54ebec
commit
018f28bead
1 changed files with 1 additions and 1 deletions
|
@ -549,7 +549,7 @@ Transform SkeletonIK::_get_target_transform() {
|
|||
target_node_override = Object::cast_to<Spatial>(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