Zoom camera in c++

Hi, I’m having problems with changing the field of view of my camera at certain moment. I am a newbie both with the engine and c++, so I might have made a mess.

I tried this in the first game template and since I have no idea yet how to bind keys I tried to add the zoom to the built-in onFire function from the Character class. I was thinking about setting the field of view to a float that I have declared EditAnywhere so that I could edit outside visual studio. The problem is nothing changes when I try the game.

Here’s the method:

The underlined one is the only line I added.

For anyone interested, I was able to solve it.
I simply created another 2 key bindings, called them “Zoom” both on pressed and released and assigned them to right mouse key.

324092-solve.png

Then I added these 3 methods, the first one returns me the default field of view, the second and third are the actual events, where I set the field of view to a new float, and returns back when I release the key.