Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question How to move Avatar in Unity using external 3D coordinate values for each human bone joint

Discussion in 'Animation' started by shyam_123, Jun 2, 2023.

  1. shyam_123


    Jan 12, 2023
    I get 3D coordinates for each human bone joints from an external device. However I am using only 14 bone joints currently (ex. Hip, Shoulders, Elbows, Head etc). The device coordinate system is right-handed Z-up.

    We are using freely available pre-built avatars like ReadyPlayerMe.

    Currently, we are following the below steps in Unity:
    1. Transform 3D coordinates received from external device into unity world coordinate.
    2. Create a position vector (Vector3) for each joint position by using the transformed 3D coordinates.
    3. Calculate bone rotations using position vectors. Use “Quaternion.LookRotation()” and “Quaternion.Inverse()” methods.
    4. Pass bone rotations to ReadyPlayerMe avatar bones.

    However, ReadyPlayerMe avatar is not working properly (it's having twisted arms and actions).Does anyone know, What is the best way to move avatar properly.