Scopes and Aiming

Purpose

This document describes how aiming and scopes work in the firearms system: aim FOV behavior, scope zoom levels, visibility modes (such as thermal or night vision), ballistic prediction, and how aiming interacts with weapon stats, character states, and multiplayer.

High-Level Overview

Aiming is implemented as a camera and UI behavior layered on top of the firearms system. When the player aims, the camera FOV changes, optional scope overlays are shown, and (for some weapons) a ballistic prediction marker can be displayed.

Aiming does not directly change weapon damage or core accuracy formulas. Instead, it controls how the player sees and controls the weapon, while hit probability is determined by underlying weapon and ammo stats.

Aim Data Asset (BP_W_Aim_ClarData)

Aiming behavior is configured through the BP_W_Aim_ClarData data asset. This asset defines how the camera behaves when entering aim mode and whether prediction is enabled.

Key parameters:

  • Field Of View
    Target camera FOV when the weapon is aimed. The system interpolates from the current FOV to this value when the player enters aim mode.

  • PredicateHit
    Bool flag that enables or disables predictive hit behavior. When true, the system calculates and shows a predicted impact point for projectile-based weapons.

  • PredicateMarker
    UserWidget class used as the visual marker for the predicted impact location. This widget is usually displayed at the screen-space point where the projectile is expected to land.

  • Transition Aim Mode Curve
    CurveFloat controlling how FOV interpolates from the current value to the aim FOV. This defines how fast and how smoothly the camera zooms in and out during aiming.

These settings allow each weapon or optic to have its own aiming behavior, zoom feel, and visual feedback.

Scopes and Zoom

Scopes are implemented as weapon modifications and use scope-related data to define zoom and sensitivity settings.

Typical scope configuration includes:

  • zoom levels stored in ScopeValues,
  • mapping between zoom levels and camera FOV,
  • mouse or stick sensitivity adjustments per zoom level.

When a scope is installed and active:

  1. The scope provides one or more zoom levels.
  2. The selected zoom level determines the target FOV while aiming.
  3. Input sensitivity is adjusted to match the chosen zoom level.

This makes high-magnification scopes feel precise while low-magnification optics remain responsive.

Visibility Modes

Scopes and optics can provide different visibility modes.

The system supports, for example:

  • normal vision mode,
  • thermal vision,
  • night vision or similar enhanced modes.

Visibility modes are configured in scope-related data (for example, through a Visibility Modes list). A specific optic can expose one or several modes that change post-processing, color grading, and how targets are highlighted.

Switching visibility modes typically:

  • updates view materials and post-process settings,
  • may add or remove screen-space overlays for the optic,
  • does not change the underlying weapon accuracy or damage.

Ballistic Prediction

Projectile-based weapons such as crossbows can use ballistic prediction while aiming.

Core elements:

  • BP_ConnectWeaponPredicateHit weapon actor for projectile shooting with prediction,
  • BP_W_Aim_ClarData.PredicateHit to enable prediction,
  • PredicateMarker widget to visualize the expected impact point.

When prediction is enabled:

  1. The system calculates the expected projectile trajectory.
  2. The prediction marker is placed at the calculated impact point.
  3. The player can adjust aim using this visual feedback before firing.

This is used for weapons where bullet drop and travel time are significant.

Aiming and Accuracy

The aiming system does not directly change accuracy or spread.

Accuracy-related behavior is driven by weapon stats, including:

  • AccuracyPercent — base weapon accuracy,
  • Dependence Of Accuracy On Continuous Shooting — accuracy change during continuous fire.

Aiming primarily affects:

  • camera FOV,
  • scope zoom,
  • sensitivity,
  • and optionally visibility modes,

while hit probability is controlled by the underlying weapon and ammo stats.

Character States and Aiming

Some weapons require specific aiming states before they can fire.

Example:

  • A crossbow requires the CharacterStates.Weapons.Aim tag to be active. In this case:
    • the player must enter aim mode,
    • only then is shooting allowed.

Character states also interact with aiming in other ways:

  • aiming can be blocked when certain forbidden states are active (for example, when the map or inventory is open, or when the character is performing specific movement or melee actions),
  • wall checks can adjust weapon pose and may restrict aiming or shooting if the character is too close to obstacles.

These rules ensure that aiming, scopes, and ballistic prediction behave consistently with the global character state system.

Multiplayer Behavior

Aiming and scopes are fully compatible with the multiplayer architecture used by the firearms system.

On the server:

  • actual hits and damage are validated,
  • gameplay decisions (such as whether a shot is allowed) respect the current aim state and character states.

On clients:

  • FOV changes, scope overlays, and prediction markers are handled locally for responsiveness,
  • visual effects (scope rendering, markers, post-process) are cosmetic and do not replace server authority for hits.

This design keeps aiming visually responsive for players while preserving server‑authoritative hit detection.

  • firearms-system.md — overall firearms runtime architecture and behavior.
  • ammo-system.md — ammo storage, selection, reload, and damage processing.