Camera anchor offset issues since 2.2

Fenda

Member
Hey Justin!

We recently updated to 2.2 and are running into an issue where the main camera gets pushed down into the ground. This didn't happen before we upgraded (from 2.1.4) with the same character and scene. We are using the first person view type.
  1. Commenting out the logic in FirstPerson.UpdateHeadOffset fixes the issue
  2. Disabling the rig game object on our character fixes the issue
  3. Using the same scene and Main Camera, but with Nolan from the demo scene fixes the issue
I noticed some change notes related to Nolan's rig so wondering if that is related? Perhaps not.
 
Are you using the built in animations? This could be related to that if you are. For 2.2 I had to recreate the characters because the rig structure changed.
 
I will add that it seems as though for whatever reason our characters bone transforms are succumbing to gravity and are very slowly falling through the ground. This can be observed by logging out the bone transform position of the m_CharacterAnchor in FirstPerson.cs. The GameObject transform Y pos does not change at all. I tried switching from using the Neck to the Head and both bone transforms Y pos are gradually falling. To prevent it i can select all the rigidbodies in the rig and set Use Gravity to false. This prevents the bone transforms from falling. No idea why this is happening for our characters.. I tried replacing our existing rig with Nolan's rig + avatar + UFPSDemo animator controller and it made no difference. Of course on the Nolan character he has Use Gravity on all his rig's rigidbodies set to true and his bone transforms do not fall at all
 
@Justin Ah! The Ragdoll ability on Nolan sets freezing of rigid bodies in its Awake(). We don't use the Ragdoll ability on our character and its rigid bodies were not frozen.
 
Ah, that would cause it. If you aren't using the ragdoll ability then it won't automatically set the rigidbodies to kinematic so you'll need to do that yourself.
 
@Justin Yeah, perhaps its worth adding some sort of warning in if freeze position is not set on a characters rig when the Ragdoll ability is not there? Maybe that's overkill, but I can imagine others might run into this issue.
 
Top