Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question How to obtain the position of a character's fingers

Discussion in 'Animation' started by zxr415, Mar 11, 2024.

  1. zxr415

    zxr415

    Joined:
    May 28, 2013
    Posts:
    32
    How can a character obtain the position of their fingers while performing actions? Because the index finger of the left hand needs to carry a special effect, it needs to be positioned specifically to send the effect.

    I used this method myself: write a script to hang on the character, which brings a GameObject public variable, then drag the index finger of the character model into this variable, and then obtain the position of the index finger GameObject in the code. But because the model can be replaced with another person, I wonder if there is any universal code that can directly obtain the finger position of a character, such as AvatarTarget LeftHand and the like.

    Thanks.