[BUG] Non-dominant hand not working - ThirdPersonPerspectiveItem

DankP3

Active member
1. Character controller variant (Ultimate Character Controller, First Person Controller, etc).
UCC 3.0.2

2. Unity version (include which SRP, beta Unity versions aren't supported)
2021.3.12f1 HDRP

3. Bug description
Third person non-dominant hand is not working

4. Steps to reproduce

set left hand in pistol to an object identifier ID and add a transform to the pistol (and specify the ObjectID and transform on ThirdPersonPerspectiveItem.

Result - nothing happens

- CharacterIK.SetItemIKTargets is not called.

- ThirdPersonPerspectiveItem m_CharacterIK is null and hence fails the null check before calling the above method at approx line 166 of ThirdPersonPerspectiveItem

- ThirdPersonPerspectiveItem approx line 60 reads:
m_CharacterIK = m_Character.GetCachedComponent<CharacterIKBase>();

- changing ThirdPersonPerspectiveItem 'line 60' to
m_CharacterIK = m_Character.GetComponentInChildren<CharacterIKBase>();
appears to fix the issue, although this may not be the best approach.

{apologies for approximate line numbers, I tampered with the script slightly whilst debugging!}

5. The full error message (if any)
None
 
Thanks for debugging! This was caused by the new structure for the character model switching feature. I will have a proper fix in 3.0.3 but your change works well for a single model :)
 
Top