Skip to content

3rd Party Integrations

Jaimi edited this page Apr 1, 2024 · 1 revision

Here is a collection of tips and tricks for getting other assets to work with UMA.

Table of Contents

Invector 3rd Person Controller

To setup the Invector 3rd person controller, you need to be using a version of UMA that has the 'Bone Builder'. This is in Release 2.7 of UMA, but also available as a feature tree for 2.6 on GITHUB.

  • You're going to need an Humanoid Avatar. UMA ships with the FBX models for the human slot sources - but the avatar is set for generic rigging. To fix this, go to the FBX file, and change it the rig type to Humanoid and apply it. For example, the male fbx is here: UMA/Content/UMA_Core/HumanMale/FBX
  • Add an "Animator" component to your DynamicCharacterAvatar.
  • Set the avatar to the Male_Unified avatar (it's the one that was generated when you changed the FBX above).
  • Set the animator to the invector animator of your choice.
  • On the DynamicCharacterAvatar, set the "RuntimeAnimatorController" to the same animator.
  • Run the bone builder on the DynamicCharacterAvatar to create the bones.
  • Open the character creator of your choice from the Invector menu
  • Drop the DynamicCharacterAvatar on the "fbx model" slot
  • Fill in the other two items from the invector files
Press the button on the Invector Character Creator, and you're done! It creates a new gameobject that is ready to go.

Final IK

FullBodyIK

You need to add the FullBodyIK during runtime. Just hook in to the CharacterCreated callback on your UMA and add the following code:

    using RootMotion; // Need to include the RootMotion namespace as well because of the BipedReferences
    FullBodyBipedIK ik;
    
    void AddDDFBBIK (GameObject go, BipedReferences references = null) 
    {
        if (references == null) 
        { 
            // Auto-detect the biped definition if we don't have it yet
            BipedReferences.AutoDetectReferences(ref references, go.transform, BipedReferences.AutoDetectParams.Default);
        }
        ik = go.AddComponent<FullBodyBipedIK>(); // Adding the component
        ik.SetReferences(references, null);
        ik.solver.SetLimbOrientations(BipedLimbOrientations.UMA); // The limb orientations definition for UMA skeletons
    }

VRIK

You need to add the VRIK during runtime. Just hook in to the CharacterCreated callback on your UMA and add the following code:

    vrik = go.AddComponent<VRIK>(); // Adding the component
    vrik.AutoDetectReferences();
    
    vrik.solver.leftArm.shoulderRotationMode = IKSolverVR.Arm.ShoulderRotationMode.FromTo;
    vrik.solver.rightArm.shoulderRotationMode = IKSolverVR.Arm.ShoulderRotationMode.FromTo;
Clone this wiki locally