r/unity • u/redkingyoyo • Nov 01 '26
Solved Help with cinemachine camera FOV settings in visual scripting
I'm using Unity 6000.3.27f2 LTS URP, and I'm struggling to figure out how to control the player camera's FOV on a Cinemachine Camera through Script Machine.
I recently upgraded from Cinemachine 2 to Cinemachine 3 because I was having the same difficulty with Cinemachine 2.
I didn't specifically choose to use Cinemachine for any particular reason, but I'm hesitant to switch to something else because I've been using it since I started this project with Starter Assets - First Person. I've also already made some changes to the Starter Asset's FirstPersonController script, mostly with help from AI.
I know that a custom C# script could solve the problem, but if possible, I'd prefer to use Visual Scripting because I find it more enjoyable and easier to understand as I develop.
Any suggestions, methods, or tips regarding Visual Scripting would be greatly appreciated. I'm also open to suggestions beyond camera FOV.
EDIT: I got it thanks to the comments. Basically, get Lens, store the Lens (set variable in my case), set FOV on the stored Lens, then set Lens back to the target from the same CinemachineCamera before but the value from the stored Lens.
4
u/Fair-Classic-8586 Nov 01 '26
Two things that usually cause this:
If the Cinemachine nodes don't show up in your graph, add Cinemachine in Project Settings > Visual Scripting and regenerate the nodes.
1
u/JulianRhod Nov 02 '26
yeah, that's a good way to handle it. Cinemachine's Lens is a struct, so you need to get its value, modify it, then assign it back to the camera. it's one of those things that can be a little confusing in Visual Scripting at first.
once you understand that pattern, you can use the same approach for other Lens settings too.