Hello there!

I think this has to be easy to be done, but I'm not guessing how to achieve this.

I have this character who follows a target (which is going to be moved in runtime in Unity) with his head.
The issue is that I want to flip the head when it is facing straight up or down, so it follows the target without "breaking" his neck.

Is this possible rigging somehow the asset or should be done by code in Unity?

If I'm not making myself clear let me know and I will attach some examples of what I mean.

Thank you in advance!

    Related Discussions
    ...

    To achieve the effect where a character's head flips to follow a target without "breaking" the neck, especially when the target moves to positions straight up or down relative to the character, you can utilize a combination of Spine's rigging features and Unity's scripting capabilities.

    In Spine, you can set up Inverse Kinematics (IK) constraints to make the head follow a target bone. This setup allows for dynamic movement and orientation of the head based on the position of the target bone. You can refer to the Spineboy example for an illustration of how IK constraints are used for aiming and following a target (Spineboy example: Aiming).

    However, to flip the head based on the target's position (especially for extreme angles like straight up or down), you might need to implement additional logic in Unity. This could involve checking the angle between the character and the target and then flipping the head bone accordingly. This logic can be implemented by modifying the scale or rotation of the head bone in Unity's script when certain angle thresholds are crossed.

    For a smooth transition and natural movement, you might also consider adjusting the IK constraints' mix values dynamically based on the target's position, ensuring that the head movement blends seamlessly with the rest of the character's animations.

    Yimec The issue is that I want to flip the head when it is facing straight up or down, so it follows the target without "breaking" his neck.

    I'm not sure I completely understand what you are trying to achieve. Why would flipping (inverting bone scale from +1.0 to -1.0 on one axis) improve the situation when looking up instead of right, could you please explain that part in more detail? Or do you perhaps mean exchanging one head attachment with a different attachment?

      15 days later

      Harald Sorry Harald, I forgot to reply! The issue is already solved with the bot answer and the expertise of my programmer haha.

      Thank you very much!!