Third Person Controller and UMA wardrobe recipes

MartinD

New member
Hello, everyone. First gj on Third Person Controller, it is a real time saver.

However I still have an issue to make it work with UMA properly. Generally character loads and if I change wardrobe during design time there is no problem. However when I do it in runtime character starts to become somewhat weird:
The code that is attached to the button is:
C#:
AvatarDefinition adf = AvatarDefinition.FromCompressedString(defRecipe);
Player.LoadAvatarDefinition(adf, true, true, true, true);
Player.BuildCharacter(false);
So nothing unusual here and also as you can see in the video another character in UMA works properly (same setup but there is no controller attached obviously).

I have done some debugging as much as I could and found that behaviour:
  1. Disable Ultimate Character Locomotion script
  2. Press button to change race and wardrobe. Nothing unusual happens
  3. Reenable Ultimate Character Locomotion. Problem reappears once again.
 
That looks like it's a collider problem. When you change the avatar bones are you also updating the bone references on the CapsuleColliderPositioner?
 
Not sure what do you mean here. All 3 fields in positioner are pointing towards same existing game objects (everything stays same as before pressing the button). Also positioner has only one public method: UpdateRotationHeight. I have disabled calling it (FixedUpdate and event registration) to see if that changes anything however problem remained.
 
So it sounds like the collider is correct. Just to confirm if you disable the CapsuleColliderPositioner do you still have the same issue? When you are changing the wardrobe are you also changing the rig?
 
Possibly found the problem. Recipe included BoneyTail_Recipe hair which is sample coming from UMA. This particular sample is using PhysicsStandardSlot which in turn uses UMAPhysicsSlotDefinition. After removing use of this wardrobe recipe it started to work.

However I have question if there is any way to make UMAPhysicsSlotDefinition work with Opsive controllers?
 
Glad you found it. I'm not familiar with that UMA feature. Does it spawn a collider? If so you'll want to make sure that collider layer is on a layer that the character controller ignores to prevent collision issues.
 
I will dig deeper into this next week. From what I have noticed this is not adding new objects but rather messing with existing ones (including layers). So far the only thing I have done was to match those layer updates with what UCC does but sadly that did not help much. I will need to check this code to see if I have missed there something.
 
Top