Focus Cam

This component allows you to capture a player's camera to draw focus to an object

Experimental - Customers are encouraged to test and use this feature in their experiences, but it may still require some additional support

How to Add Focus Cam to An Object in The Editor:

Add the following component to an object

Configuration/Setup & Adding Settings

Once you have this added you have multiple options on how to configure the focus cam for a given object.

There are various available presets for the focus cam available. These presets are data classes which inherit from M2 Focus Cam Properties Data class.

This is what a preset class will look like and all of the variables that can be modified.

On the object in question, to use a preset; tick the ‘Does Focus Cam Use Preset Properties’ field and add your preset class to the field ‘Preset Focus Cam Data’.

If the field ‘Does Focus Cam Use Preset Properties’ is unchecked, then you can use per object instanced settings under the heading ‘Instanced Focus Cam Data’

Settings Explained

Is Locked in Place’ will lock the focus cam to its initial position - you won’t be able to orbit around the orbit or move the camera to look around if this is ticked.

Focus On Menu Requested’ will allow the focus cam mode to be entered instantly when interacting with the object (only if there is only one option - like on the screen in the approachability gym & Indus)

Is Camera Setup Relative To Focused Object’ if this is ticked, the initial target arm length of the camera will not take into account the player's location. If it is not ticked, it will add the player's distance to the target arm length.

So if camera is setup relative to the focused object, target arm length = spring arm target length offset, otherwise, target arm length = distance to player + spring arm length offset (Spring arm length offset will be explained in the following setting explanation.

Spring Arm Target Length Offset’ used in the aforementioned calculation, determines how far away the camera will be from the target object, or from the player.

Spring Arm Vertical Offset’ how far is the camera offset vertically from the focused object.

Look at Object Sensitivity’ used in a multiplication sum in code to slow down the linear interpolation when the camera zooms out/in, so the lower the fraction the smoother the interpolation.

Max Spring Arm Length’ the maximum distance the focus cam can be zoomed away from the focused object

Min Spring Arm Length’ the minimum distance the focus cam can be from the focused object.

Orbits’ determines whether the camera can rotate around the object or not. Some settings are only available in each case and will be outlined. If not ticked the camera will still rotate, but on its own axis, rather than around the object in question. This will be referred to as ‘first person mode’.

If Orbit Ticked Settings

Spring Arm Initial Yaw Degrees Offset’ The initial offset of the camera in degrees from the player’s location on the yaw axis.

Max Spring Arm Yaw Rotation Degrees’ The maximum rotation in the yaw axis from the starting location

Max Spring Arm Pitch Rotation Degrees’ The maximum rotation in the pitch axis from the starting location

Spring Arm Rotation Multiplier’ The higher this value, the faster the rotation speed around the object.

Zoom Multiplier’ The higher this value, the faster the zoom speed will be.

Camera Deceleration Multiplier’ The higher this value, the faster the camera’s rotation will decelerate.

Camera Zoom Deceleration’ The higher this value, the faster the zoom will decelerate.

If Orbit Not Ticked Settings

First Person Camera Yaw Sensitivity’ how fast does the camera rotate in the yaw axis in first person mode.

First Person Camera Pitch Sensitivity’ how fast does the camera rotate in the pitch axis in first person mode.

First Person Camera Max Pitch Rotation Degrees’ how far can the camera rotate in the first person mode in the pitch axis.

First Person Camera Max Yaw Rotation Degrees’ how far can the camera rotate in the first person mode in the yaw axis.

Technical Details

Code classes/structs involved:

UM2_FocusCameraComponent - component class which is added to interactables. Is responsible for the setup and functionality of the focus cam system. Live config value Interaction.UseFocusCamMode must be set to true for the focus cam to function.

FM2FocusCameraProperties struct holds all the aforementioned settings which allow for the customisation of the focus cam’s functionality.

Blueprints Involved:

BPC_FocusCamControl

Camera control class which interfaces between the player character’s interaction events and the focus camera component on a given interactable.

BP_M2_Origin_PlayerCharacter

Hooks up to interaction events ‘OnMenuRequested’ and ‘OnInteractMenuClosedEvent’ as well as ‘AttemptToMove’ to enter and exit focus cam interactions.

BPM_ScreenFocusManager

Manages the forcing interaction between the chairs and the screen. To set this up, place a manager in the map, and add a reference to the ‘Video Screen’ variable.

Last updated