ToggleVisibility not working perfectly on character zoom in and out.

I have setup a zoom in and out on my characters Camera Boom, which is working fine, but also wanted to have the character disappear as the camer moves into a first person view.
It works perfectly on the zoom in but then stutters the visibility on and off as I zoom back out. I have tried over a dozen setups and this is the closest one I have come to.
Any suggestions on how to improve it would be welcome.

In a nutshell, it’s not the way to do it. Two problems, one is you’re leaving the animation of the transistion to the mouse wheel, the other is you don’t need to move the camera.

This kind of thing is most easily achieved with view targets. Here’s how view targets work:

And I WAS going to link to a vid showing the correct way to change views, but most of the youtube vids are going about it the wrong way. You will see a lot of stuff manipulating the spring arm, which is incorrect. And a lot of stuff using SetActive to change cameras, which wont give you a smooth transition.

The best and easiest way to do it is to leave the normal 3p camera alone, and stick a new camera right in the head of the player. Then all you have to do it SetViewTargetWithBlend to change cameras. No messing about with spring arms and vector maths… :slight_smile:

Thanks for the suggestions and link. The issue with that option is you are left with only a few fixed views, the player cannot scroll to their own personal view distance, and so it lacks the individual customization that I am looking to achieve. If you know of any other way to achieve this I would be happy to learn.

Sorry, didn’t read it carefully. So, basically you need to use the mouse as a trigger for the zooming, but put the control of the smoothness under something else. Like this:

When the camera is within a certain distance of the player, you can just hide the player mesh.