CrimsonCamera · Lesson 6 of 6

Occlusion Fade, Multiplayer & Recap

Intermediate4 minGameplayOverview

Before you start

  • Completed: the previous lessons
Video coming soon

Chapters

Fade occluding geometry

Add a UCrimsonCameraOcclusionComponent to the pawn. It traces from the camera to the pawn each tick (for the local player only) and fades tagged occluders via a material scalar — it does not change visibility directly.

  1. Add the FadeableActorTag (default CameraFadeable) to each occluder actor.
  2. In the occluder's material, add a scalar parameter named by FadeParameterName (default FadeAmount) and wire it to a dither / opacity-mask so 1 = invisible.
  3. Optionally tune FadedAmount, FadeInterpSpeed, TraceRadius, and TraceChannel on the component.
No scalar, no fade
The component only drives a material scalar. If the occluder's material has no FadeParameterName scalar (or it isn't wired to opacity), nothing visibly fades.

Camera is a local concern

Every CrimsonCamera feature runs on the locally-controlled pawn and produces a view for that one client — nothing here is server-authoritative gameplay state, so there's no replication to manage. Lock-on changes only the local control rotation (which already replicates as the player's view).

Don't drive gameplay from the camera
If an ability needs the locked target server-side, read it on the server from your own gameplay state — don't trust a client's camera target as authoritative.
Need a UI takeover?
UCrimsonUICameraManagerComponent lets a UI flow (inventory inspect, character screen) seize exclusive camera control via SetViewTarget, then hand it back. That API is C++-only — wrap it in a BlueprintCallable function to call it from widgets. See the UI Camera How-To.

Recap

  • A camera is a stack of blendable modes, not tick code — push to transition, pop to revert.
  • Switch views with tag-keyed overrides or per-frame selection; overrides win.
  • Third-person ships with shoulder, zoom, lag, recenter, plus a safe camera shake passthrough.
  • Lock-on is data-driven on the Gameplay Targeting System, with multiple lock points per target.
  • Occlusion fade clears the shot, and the whole system is local-only — nothing to replicate.

You now have a composable camera that blends between third-person, aim, top-down, and lock-on — with the polish a shipped game needs and no per-frame camera code.