Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flip Skeleton2D animation via scale.x, animation with TwoBoneIK #86868

Closed
874808039 opened this issue Jan 6, 2024 · 4 comments
Closed

Flip Skeleton2D animation via scale.x, animation with TwoBoneIK #86868

874808039 opened this issue Jan 6, 2024 · 4 comments

Comments

@874808039
Copy link

Tested versions

Godot_v4.2.1-stable

System information

Godot v4.2.1.stable - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 Ti (NVIDIA; 31.0.15.4633) - 13th Gen Intel(R) Core(TM) i7-13700KF (24 Threads)

Issue description

I have an animation of a character walking to the right. The animation is implemented using Skeleton2D and Polygon2D. Skeleton2D has SkeletonModification2DTwoBoneIK. I put Polygon2D and Skeleton2D under a Node2D node. I hope to modify the scale.x = -1 of the Node2D node to make The character animation changes to walking to the left, but the character's IK end bone pointing is wrong, and the pointing cannot correctly point to the Target.

Godot_v4.2.1-stable.2024.01.06.-.16.33.35.03.mp4

Steps to reproduce

Play the run animation of man.tscn and change the scale.x of Graphics to -1

Minimal reproduction project (MRP)

godot-animation.zip

@dandeliondino
Copy link

I can confirm the same issue, also in 4.2. FYI, the workaround described in this video worked for me (keyframing bone rotation instead of the target positions). I thought I saw somewhere in the docs that IK is meant to be editor-only, not used at runtime, but I can't find the reference right now.

@874808039
Copy link
Author

So, this is a bug in the godot4 skeleton system?

@myyk
Copy link

myyk commented Jan 9, 2024

I thought I saw somewhere in the docs that IK is meant to be editor-only, not used at runtime, but I can't find the reference right now.

I think that just means that IK is for setting keyframes, but not used during runtime to animate. So from what I understand @874808039 is using it correctly. actually, I'm not sure. This is what it says:

IK chains in Godot currently work in the editor only, not at runtime. They are intended to ease the process of setting keyframes, and are not currently useful for techniques like procedural animation.

https://docs.godotengine.org/en/stable/tutorials/animation/cutout_animation.html#ik-chains

There's a fix that's been stuck for this AFAIK: #81051

@AThousandShips
Copy link
Member

AThousandShips commented Jan 9, 2024

Thank you for reporting, closing as a duplicate of:

Consolidating there

@AThousandShips AThousandShips marked this as a duplicate of #80252 Jan 9, 2024
@AThousandShips AThousandShips closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants