Rectifying Zion Dev Diary #1 - UMA and HAP

Posted by Dewald Bodenstein

This dev diary is a quick run down of how we got the Unity Assets, Horse Animset Pro (HAP) and Unity Multipurpose Avatar (UMA), to work together. Here’s our video (more details below):

I had to set all Bone References after the UMA Dynamic Character Avatar (DCA) was generated. Use the Created event on the UMA to fire a function to do this. Some minor changes were also made to the Malbers classes. This may not be necessary on newer versions though (4.0 and up).

Our event function does the following:

  1. Get the Malbers Components on which to set the references
  2. Get references to the required bone transforms
  3. Create EquipPoint GameObjects for Left and Right hands
    1. Parent them to the appropriate bone transform
    2. add an offset and rotation
  4. Create Holder GameObjects for Back, Left and Right
    1. Parent them to the appropriate bone transform
    2. add an offset and rotation
  5. Instantiate the required weapons
    1. Parent each to the appropriate holder
    2. Add each to the inventory
  6. Set the Transform references on the RiderCombat component for the Holders and EquipPoints
  7. Re-set the Head, Chest, Hands and Shoulder references on the RiderCombat component
  8. Re-set the AimOrigin to the Head transform on the IAim component

Changes made to the Malbers classes:

  1. On the RiderCombat class, the setters for the Head, Chest, Hands and Shoulders references were not public. I had to change this.
  2. On the IInventory I decided to change the Inventory variable from being a GameObject array to a GameObject List instead.

Links:

comments powered by Disqus

Related Game

Rectifying Zion