UTopDownCameraMode
This mode positions the camera above a target area using trigger volumes to define the camera pivot point
Key Features
- Sets the camera pivot based on the bounds of a BoxComponent volume (arena or zone)
- Activates and repositions the camera when the target actor overlaps a trigger volume
- Maintains a fixed camera location and rotation for a classic top-down perspective
Properties
DefaultPivotRotation (FRotator): Fixed rotation angle for the camera pivotBoundsSizeToDistance (FRuntimeFloatCurve): Curve mapping bounds size to camera distance
Methods
OnActivation(): Calculates pivot location based on the target volume's bounds when mode activates
virtual void UTopDownCameraMode::OnActivation() override;
UpdateView_Implementation(float DeltaTime): Updates the camera's location, rotation, and FOV each frame
virtual void UpdateView_Implementation(float DeltaTime) override;
GetTargetVolume(): Finds the BoxComponent trigger volume overlapped by the target actor to define camera bounds
UBoxComponent* UTopDownCameraMode::GetTargetVolume() const
Usage
- Place
ATopDownCameraModeTriggeractor in the level to define camera zones - The camera activates and positions itself above the volume when the player overlaps the trigger
- Configure
DefaultPivotRotationandBoundsSizeToDistancecurve to adjust camera angle and zoom behavior