From 277696d6c50eba68ca11cf3c0988be0213e5c65d Mon Sep 17 00:00:00 2001 From: Andrea Catania Date: Tue, 24 Mar 2020 09:59:32 +0100 Subject: Fixed IK rotation issue --- editor/plugins/skeleton_ik_editor_plugin.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'editor/plugins') diff --git a/editor/plugins/skeleton_ik_editor_plugin.cpp b/editor/plugins/skeleton_ik_editor_plugin.cpp index b031bd71d3..418e10a0f0 100644 --- a/editor/plugins/skeleton_ik_editor_plugin.cpp +++ b/editor/plugins/skeleton_ik_editor_plugin.cpp @@ -44,10 +44,7 @@ void SkeletonIKEditorPlugin::_play() { skeleton_ik->start(); } else { skeleton_ik->stop(); - - for (int i = 0; i < skeleton_ik->get_parent_skeleton()->get_bone_count(); ++i) { - skeleton_ik->get_parent_skeleton()->set_bone_global_pose_override(i, Transform(), 0); - } + skeleton_ik->get_parent_skeleton()->clear_bones_global_pose_override(); } } -- cgit v1.2.3