Home › Modules › AFM_CameraFade
Module

AFM_CameraFade

A player-controller component that fades the camera to and from black.

What it gives you

  • Camera fade as a one-line call
  • Used by level loading and teleport comfort

Requires

None

Required by

AFS_Core_Loading AFS_UI_Navigation AF_Examples

1 assets1 API members

Description

A small, focused component. Client_Fade fades the owning player's camera over a duration in a given direction. It exists as a component on the player controller rather than as a global so it works correctly in multiplayer, where each player fades independently.

The loading system fades before a level switch; the teleport system fades as a comfort option.

Setup

  1. Add BPC_PlayerController_CameraFade to your player controller.

Usage

Call Client_Fade with a duration and a direction from E_CameraFade_Direction. Fades are per-player, so calling it on one controller does not affect others.

Key properties

PropertyWhen to change
DurationFade length; 0.5 s suits most transitions

Extending

Not typically extended.

Multiplayer notes

Multiplayer

Because the component lives on the player controller, level loading can fade every player before a servertravel by iterating controllers on the server.

Example map

Used implicitly by every level switch in Map_Examples_Lobby.

Troubleshooting

The fade does not happen on clients. It was called on the server for a client's controller without using the client RPC — Client_Fade is already a client call, so call it directly on each controller.

API reference

Every blueprint asset in this module. Expand an asset to see its members.

Components

BPC_PlayerController_CameraFade1 members
extends ActorComponent

Fade component for a player controller. Client Fade runs the camera fade on the owning client over a duration, or applies it in one step when the duration is zero or less. Add it to a player controller of your own; teleport, level loading and the intro all fade through it, and a controller without it stays unfaded through those transitions.

KindNameSignatureDescription
eventClient_Fade(Duration: float, Direction: E_CameraFade_Direction)Fades this player's camera to black or back to the scene over the given duration. Called before a level switch and as a teleport comfort option.