SA.FullBodyIK.HeadIK._SyncDisplacement C# (CSharp) Method

_SyncDisplacement() private method

private _SyncDisplacement ( FullBodyIK fullBodyIK ) : void
fullBodyIK FullBodyIK
return void
			void _SyncDisplacement( FullBodyIK fullBodyIK )
			{
				// Measure bone length.(Using worldPosition)
				// Force execution on 1st time. (Ignore case _settings.syncDisplacement == SyncDisplacement.Disable)
				if( _settings.syncDisplacement == SyncDisplacement.Everyframe || !_isSyncDisplacementAtLeastOnce ) {
					_isSyncDisplacementAtLeastOnce = true;

					if( _headBone != null && _headBone.transformIsAlive ) {
						if( _headEffector != null ) {
							SAFBIKQuatMultInv0( out _headEffectorToWorldRotation, ref _headEffector._defaultRotation, ref _headBone._defaultRotation );
						}
						if( _leftEyeBone != null && _leftEyeBone.transformIsAlive ) {
							SAFBIKQuatMultInv0( out _headToLeftEyeRotation, ref _headBone._defaultRotation, ref _leftEyeBone._defaultRotation );
                        }
						if( _rightEyeBone != null && _rightEyeBone.transformIsAlive ) {
							SAFBIKQuatMultInv0( out _headToRightEyeRotation, ref _headBone._defaultRotation, ref _rightEyeBone._defaultRotation );
                        }
					}

					_isEnabledCustomEyes = fullBodyIK._PrepareCustomEyes( ref _headToLeftEyeRotation, ref _headToRightEyeRotation );
                }
			}