Search Unity

C# How can I get the position of a bone/joint?

Discussion in 'Scripting' started by From-Soy-Sauce, Sep 2, 2014.

  1. From-Soy-Sauce

    From-Soy-Sauce

    Joined:
    Jan 7, 2014
    Posts:
    162
    Hello, I was wondering how I could return the position of a bone/joint from the FBX on my character.
     
  2. ThermalFusion

    ThermalFusion

    Joined:
    May 1, 2011
    Posts:
    906
    Add a Transform reference to your script.
    Drag the joint transform into this reference in the inspector. That gives you access to all its spatial information.
    If your character model is optimized make sure you expose the joints you need, read the model importer and mechanim setup docs for this.