Animating a zoom view

A core element of modern First-Person Shooters is a variable FOV (also known as field of view) in the form of a player's ability to look down the scope of a gun to get a closer view of a target. This is a significant contributor to the feeling of accuracy and control that modern shooters provide. Let's add a simple form of this functionality to our prototype.

In an empty section of grid next to your mouse input nodes, right-click, search for an InputAction Zoom trigger node, and add it. We want to modify the FOV value that is contained within the FirstPersonCamera component, so we go to the Components panel and drag FirstPersonCamera out onto the event graph.

Drag the output pin into empty space, search for the Set Field Of ...

Get Blueprints Visual Scripting for Unreal Engine now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.