Search Unity

Inverse Kinematics has wrong coordinates

Discussion in 'Animation' started by a465474, Jul 26, 2022.

  1. a465474

    a465474

    Joined:
    Jul 26, 2022
    Posts:
    1
    I use the animation rigging package in Unity to make a "Two Bone IK Constraint" on the arms of my character, to move the arms when I change the position of the hands (Inverse Kinematics).


    I wrote code that makes sure that the hands of my character always have the same position and rotation as the red spheres (red spheres are child objects of the camera). This way the hands are always in the same position on the screen. This works fine unless I start the game, and then change the rotation of a parent bone (chest bone for example). If I do that, it creates an offset between the red sphere and the hands. The red sphere and the hand are not in the same place anymore. Keep in mind, I have a script the sets the hand position to be the same as the position of the red sphere.

    Here comes the crazy part: When i check the position with a debug.log, it tells me that the hand and the red sphere have the EXACT same position. That's not possible! They are in two different places.



    Can somebody help me with this?