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

Unable to run multiple Skeleton IK on chain #47113

Open
iuripugliero opened this issue Mar 17, 2021 · 1 comment
Open

Unable to run multiple Skeleton IK on chain #47113

iuripugliero opened this issue Mar 17, 2021 · 1 comment

Comments

@iuripugliero
Copy link

Godot version:
master

OS/device including version:
Windows 10

Issue description:
Starting a skeleton ik node stops all previous if bones share some of its chain. Similar to #38026 but it's fix only works for complete separated chain (ie left arm and right arm). In this case a "Spine IK" for aiming was getting cleared by a "LeftHand IK" for hand placement (left arm chain should receive both IK influences).

Steps to reproduce:
Set up two Skeleton IK nodes, one on parent bone and one on child (ie chest and left arm) and start them both.

Some suggestion:
I know this is not the place for it, but saving IK information to animation keyframes could be useful. As it seems right now, IK transforms on bones are not recorded on "pose" property of bones.

@smix8
Copy link
Contributor

smix8 commented Apr 25, 2021

Is it the same with the reworked skeleton ik from PR #39353?

The current merged master SkeletonIK has still more or less the old code base from Godot 3.x and SkeletonIK is exclusive and can't be mixed with other SkeletonIK in this version.

As it seems right now, IK transforms on bones are not recorded on "pose" property of bones.

The SkeletonIk result are applied as the bone_global_pose_override. This replaces the internal bone global pose values completely on each process frame while the SkeletonIK is running.

Skeleton has 4 bone pose layers:

  • bone rest pose (default pose, does not change)
  • bone pose (animation keyframes, applied on top bone rest pose)
  • bone custom pose (set by users mostly)
  • bone global pose override (used by SkeletonIK to overwrite everything else)

If you query Skeleton.get_bone_global_pose(bone_inx) AFTER the SkeletonIK process the ik results for the bone are returned as a Transform relative to the skeleton.

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

3 participants