Search Unity

Quadruped IK rigging and animating?

Discussion in '2D' started by SpaceJoker, Jan 18, 2022.

  1. SpaceJoker

    SpaceJoker

    Joined:
    Apr 27, 2018
    Posts:
    15
    So I made a sprite and rigged it in Unity using the 2019 2d packages, tweaked so the sprites would move convincingly alongisde the body and it works wonders when I animate the head or tail, but when animating the limbs I run into the issue that if I move any parent bone while recording an animation (like the body the limbs are attached to), the limbs move as well and I have to manually reposition them to their original coordinates (they are multiple joines limbs so i have to make a lot of adjustments) if i don't want them to move.

    Imagine a quadruped crouching to get its head closer to the ground, its front limbs would bend but the feet would stay planted, I'm trying to achieve that. By manually keeping them planted I run across random issues of feet sliding even though I didn't add any keyframe to the animation to make them do so and other stuff that I can't quite understand because this is the first time I've ever animated anything. So my issues could be born out of a lack of understanding of keyframes.

    But for example I was able to make my sprite crouch while keeping 3 out of the 4 limbs planted and bending in a natural way, but for some reason I lost the keyframe data for the 4th limb when I was done recording the other 3 and the rest of the body up to that frame, and it became impossible to repeat the procedure to that 4th limb without it spasming randomly during the starting and ending keyframes. even though I just repeated what I'd already done with the other 3.

    Then I tried implementing IK to the limbs, I have to use Chain because they aren't human limbs. I simply don't like the lack of control over the limbs that I get, they don't move very realistically despite the fluidity. I can't quite make the animations I want to, parts of the sprite get deformed or contort way too easily and by reducing the "sensitivity" it just becomes annoying to do anything. But I noticed that if I add the IK effector/target to the second-to last joint, then I can move most of the body around and the limbs themselves will bend to "follow" the new position without actually moving around the space (see at 7:00 here
    for what I mean).

    Problem with this is that the feet, while staying mostly in the same position, they still rotate and contort randomly as I move the body around. And the other issues with animating the limbs still persist, so I'd have to manually enable and disable the IK at specific frames to do more complex animations which is rather annoying.

    Can anyone give me some insight on how to achieve what I want?