Skip to content
Gallery
Documentation: Add-On - Dynamic Combat Camera
Share
Explore
Dynamic Combat Camera

icon picker
Combat Modifier

DCC_ScreenEdge_Edge-ezgif.com-optimize.gif
Trying to keep enemies visible on screen
DCC_Continuous-ezgif.com-optimize.gif
Dynamic Camera Arm Length

Combat Modifier

One of the more basic requirement of a dynamic camera, especially in a game where the player fights multiple enemies, is the combat camera. This very important feature allows various the camera’s Arm Length to change based on the enemies around the player.
This modifier uses both multiplier methods, which multiply the value of the Arm Length, and additive methods, which add to the arm length. Th Arm Length value is calculated using the simple following formula:
where:
: Final Arm Length.
: Initial Arm Length.
: Multiplier by which the Arm Length should be multiplied.
: Additive distance to add to arm length.

General Settings

In your DCC Camera Data Asset, you’ll find the settings to fully customize your combat camera.
image.png
Enabled: Whether the Combat Modifier is enabled or not.
TargetDistanceMax: Whether the Combat Modifier is enabled or not.
AdditiveMethodSettings: The settings of the methods used to additively modify the Arm Length in the Combat Modifier. You need to set which methods are used in the AdditiveMethods set.
MultiplierMethodSettings: Settings for each camera multiplier method. Each mode works differently but they all multiply the arm length.
EnemiesGetterMethod: Method which you can use to provide us with all the enemies which are currently in combat with the player.

Arm Length Multipliers

General Multiplier Settings

MultiplierMethod: Enum defining the method with which the Arm Length of the camera changes in combat. Each mode works differently but they all multiply the arm length.
UpdateSpeed: The speed with which the Arm Length multiplier is updated in the selected mode.
BlendOutSpeed: The speed at which the Arm Length Multiplier blends out to 1 when the DCC Modifier is disabled.

Static

This mode makes multiplies the arm length of the camera with a static value which never changes.
StaticArmLengthMultiplier: Value by which the current Arm Length should be multiplied when using Static multiplier mode. This value is constant.
DCC_Static-ezgif.com-optimize.gif

Spheres

This mode uses multiple spheres, each one bigger than the last. Each sphere defines by how much the camera arm length should be multiplied. We only use the biggest sphere that has an enemy inside.
SphereSettings: List of sphere settings. The radii HAVE to be in ASCENDING order! In runtime, we find which is the biggest sphere with enemies inside and use its settings. Each sphere has the following settings:
ArmLengthMultiplier: Arm Length Multiplier to use when this is the biggest occupied sphere.
UpdateSpeed: Update speed of the Arm Length Multiplier when this is the biggest occupied sphere.
Radius: Radius of this sphere. This HAS to be bigger than the previous sphere!!
DCC_Spheres-ezgif.com-optimize.gif

Continuous

This mode maps the distance to the furthest enemy to define the value the Arm Length Multiplier; i.e., you can make it so that the further you are from enemies, the further/closer the camera gets to the player.
On top of that, this can be mapped onto a curve to define how much the multiplier accelerates/decelerates.
MinArmLengthMultiplier: By how much we should multiplie the Arm Length distance when the furthest enemy is really close. This isn't constant and changes depending on the distance to the enemies. When the distance to the furthest target is close to 0, the arm length is at its minimum value.
MaxArmLengthMultiplier: By how much we should multiplie the Arm Length distance when the furthest enemy is at MaxTargetDistance . When the distance to the furthest target is equal to MaxTargetDistance , the arm length is at its maximum value.
ArmLengthAccelerationCurve: Float curve which defines how the Arm Length multiplier accelerates depending on the furthest enemy. This curve should be normalized between 0 and 1.

DCC_Continuous-ezgif.com-optimize.gif
The acceleration curve values have to be normalized (between 0 and 1). The X axis signifies how far is the furthest enemy compared to the MaxTargetDistance , i.e., when X equal to 1, the enemy is MaxTargetDistance away, when it’s 0.5 then their 50% of MaxTargetDistance away; etc.
The Y axis signifies how much percentage of the [MinArmLengthMultiplier , MaxArmLengthMultiplier ] we should use.
Example
We’ll use the following data:
MinArmLengthMultiplier : 1.
MaxArmLengthMultiplier : 2.
MaxTargetDistance : 5m.
And we’re using the following curve
image.png
If the furthest enemy is 5m away, i.e., they’re the furthest they can be (X is 1), then the value of the multiplier is the biggest it can be (Y is 1), which is 2.
If the furthest enemy is 2.5m away, i.e., they’re the furthest they can be (X is 0.5), then the value of the multiplier is at the halfway point of the range [MinArmLengthMultiplier , MaxArmLengthMultiplier ], which means it is equal to 1.5 (Y is 0.5).
verified-account
Tip: If you flip the previous curve, you can invert the camera’s behaviour so that it gets closer when you’re far and zooms out when you’re close.
DCC_Continuous_Inverted-ezgif.com-optimize.gif

Dynamic

This mode will decrease the camera Arm Length when all of the enemies are visible and slightly increase it when they get behind the player's back.
MaxArmLengthMultiplier: The maximum value by which we can multiply the arm length when trying to keep enemies at the edge of the screen visible.

Additive Arm Length

General Additive Settings

Inside the Additive Methods Settings, you can customizer how the additive value is interpolated and which methods can be used.
UpdateSmoothing: Smoothing of the interpolation of the Additive Arm Length value (uses Exponential Smoothing). The lower the value, the more aggressively the Additive Arm Length changes.
BlendOutSpeed: The speed at which the Additive Arm Length blends out to 0 when DCC Modifier is disabled.
AdditiveMethods: The methods used to additively modify the Arm Length in the Combat Modifier. Multiple methods can be selected.

Tag Mappings

This mode defines how much we add to the Arm Length when one of the setups tags are present on one of the enemies. This can be used to increase the arm length when facing big enemies.
GameplayTagToArmLengthMapping: Arm length distance to add for enemies that have this gameplay tag. Only the biggest found value is used.
TagToArmLengthMapping: Same as GameplayTagToArmLengthMapping but uses normal tags.
DCC_TagMappings_Huge-ezgif.com-optimize.gif
Increase camera distance due to big enemy with tag

Screen Edge

This mode uses a dynamic additive arm length which is used to prevent enemies at the edge of the screen or behind the player from going off-screen.
MaxAdditiveArmLength: The maximum distance we can add to the arm length when trying to keep enemies at the edge of the screen visible.
DCC_ScreenEdge_Edge-ezgif.com-optimize.gif
Camera Distance increase when enemies are at the edge of the screen
DCC_ScreenEdge_BehindPlayer-ezgif.com-optimize.gif
Camera Distance increasing when enemies are behind player

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.