#Cinemachine Camera Randomly Super Zooms?

1 messages · Page 1 of 1 (latest)

tough epoch
#

Pardon the phone recording, but I have this really odd bug and I don't know if it's a code issue or a configuration issue.
My aim camera blends from my normal follow camera upon hitting my controller trigger. It eases in at a very low threshold.
However, as I shoot, which has the cinemachine camera shake, it has been randomly just super zooming into my character or gun model.
It's almost as if the shake activation breaks the camera brain.
I need get some more recordings when I have time tomorrow, because it is easily repeatable and happens over and over.
This short clip shows it random zooming in too much on shoot.
It makes sense when objects are behind me and the camera sometimes snaps close to me, but this is in open air and makes no sense.
Note the base code to this is just Unity's 3rd person starter asset package

tough epoch
#

I need to perhaps play it back frame by frame too, become I'm not sure if it's a camera zoom or maybe even the muzzle flash sprite bugging out on instantiation.

tough epoch
#

Yup, it's a random camera zoom! I have no idea why it's doing this for a frame or two.

vale canopy
#

can you show your camera aim code?

#

it seems to be when the aiming starts

#

how consistent is it to replicate?

tough epoch
tough epoch
#
private void Aim()
        {
            float isAiming = _input.aim; // This checks if the left trigger is being pressed

            bool isShooting = false;

            //animator.SetBool("IsAiming", isAiming);

            aimCam.Priority = isAiming > 0.05f ? 2 : 1;
            
            normalCam.Priority = isAiming < 0.05f ? 2 : 1;

            SprintSpeed = isAiming > 0.0f ? SprintCache*0.75f: SprintCache;

            if (isAiming > 0.0f)
            {
                _animator.SetLayerWeight(_aimingLayerIndex, 1);
                // GET CURRENT WEAPON LOGIC HERE 
                //AimTowardMouse();
                _animator.SetBool("isAiming", true);
            }
            else if (isShooting)
            {
                // TODO: Add hip-fire logic here
                //_animator.SetBool(_animIDWalkBack, false);
                //animator.SetBool("IsAiming", false);
            }
            else
            {
                //_animator.SetBool(_animIDWalkBack, false);
                _animator.SetBool("isAiming", false);
            }
        }

So I have my aim cam and normal cam that I set the priority with the left trigger axis amount. While this code is rough as I test through my controller, I don't see anythingh jumping out to me. Especially because the camera blend to ease in and out. I have the update set to smart update too.