The Focus Camera Modifier allows you to center your camera on any position and/or actor in the game.
This is useful for implementing systems like Hard-Lock (also known as Camera Lock-On), Aim Assist, or highlighting points of interest in the game such as loot, or conversations recipients.
Here are examples from AAA video games
Source - Elden Ring
Source - Red Dead Redemption 2
Source - Dark Souls
Source - Uncharted: The Lost Legacy
Focus Modifier Setup Video
Focus Modifier Settings
There are a number of settings you can tweak for the focus modifier.
Enabled: Whether is enabled or not.
Interp Speed: How fast the camera keeps track of the focused location.
Rotation Offset: An offset in degrees applied on the pitch and yaw. This is useful if you want the focused location to always be on the left/right or looked down/up.
Without Rotation Offset
Target perfectly centered
With Rotation Offset (Yaw=-20.0)
Target is offset to the right side
Ignore Camera Input: Whether the player’s input should be ignored when the focus is active or not.
Disabling it will make the camera feel like a spring pulling back to the focus target.
Focus Camera with input
Rotate Yaw Only: Whether we should rotatet only the yaw angle of the camera or the pitch as well. You can set this to true and combine it with the Rotation Offset if you want the cam to stay at a specific pitch.
Stop if Blocked LOS: Whether we should stop focusing if the line of sight to the target location is blocked.
Blocked LOS Time Threshold: How long should the Line Of Sight be blocked before we finally disabled the Focus.
Min Distance from Target: The minimum distance from the target. This is useful because being too close to the location will make the camera spin like crazy.
Max Distance from Target: This is useful in order to disable the focus camera if the target location gets too far.
Focus Target Method: This is a class you can create which will give us the location and the actor that the camera should focus.
You can set these settings either by calling SetCameraFocusSettings (among other functions) on BP_UGCCameraManager:
These are all functions you can use in the BP_UGCCameraManager.
Or you can set them through the UGCCameraDataAssets, and then calling SetCameraData on BP_UGCCameraManager (see
In order to create a new target method, start by creating a new Blueprint Class, inheriting from UGC_IFocusTargetMethod
In your new blueprint, you can override the GetTargetLocation function
The function passes in some potentially useful information to you such as the owner actor, the owner’s location, the location of the camera and its rotation.
Always call the parent function in the GetTargetLocation!
Here you can use your components or calculations to provide the target location that you want the camera to focus on and potentially the actor that is being focused as well. The focused actor output is used to test for the line of sight.
Now you can compile and save.
In order to use the new target method, you can either set it up in your UGC Camera data asset
Or you can call SetFocusTargetMethod by passing in the class of the blueprint you have just created
Focus Modifier Issue
The problem with the focus camera is that when you get too close to the location you are trying to look at, the camera starts spinning around trying to catch up but never being able to.
As a workaround, we have made it so that the position you are trying to focus will slightly get more offset forward when you get too close, that way the camera stays sane.
(Notice how the arrow on top of the target gets offset around)