From 6b6d8abdfdd466ae1dc49ec34096a0ee3c44b3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Thu, 17 Jul 2025 09:12:26 +0200 Subject: [PATCH] editor retarget animation: reset pose before retarget to avoid mistake of retargeting while in a different pose --- Editor/AnimationWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Editor/AnimationWindow.cpp b/Editor/AnimationWindow.cpp index d77353340..c12c6ce2c 100644 --- a/Editor/AnimationWindow.cpp +++ b/Editor/AnimationWindow.cpp @@ -984,7 +984,9 @@ void AnimationWindow::Create(EditorComponent* _editor) retargetCombo.SetSelectedWithoutCallback(-1); wi::scene::Scene& scene = editor->GetCurrentScene(); - Entity retarget_entity = scene.RetargetAnimation((Entity)args.userdata, entity, true); + Entity dst_entity = (Entity)args.userdata; + scene.ResetPose(dst_entity); // reset pose to be able to retarget anim to character while it's already in an animated pose + Entity retarget_entity = scene.RetargetAnimation(dst_entity, entity, true); if (retarget_entity != INVALID_ENTITY) { NameComponent name;