0
\$\begingroup\$

I have a character and I need to save all the joints positions, like Hip - Leftleg - Rightleg.

Should I use transform.position or transform.localPosition?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Hello, It sounds like a XY-problem to me. Why do you need to save all the joint's positions? Generally they are included in the model file or prefab rather than being saved separately. Maybe you just need to save the position of the character root node. \$\endgroup\$
    – Mangata
    Jul 18 at 6:56

1 Answer 1

1
\$\begingroup\$

You can use localPosition because it's the position of the child relative to its parent. The transform.position is not, it's relative the world position, if you want to store the joint position.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .