Passer au contenu
Média 1 pour l'article TopDown Camera for RTS
0 commentaire

Description

A modular, high-performance TopDown camera system built in C++ for Unreal Engine 5.

Designed for RTS games, city builders, tactical strategy titles, and classic RPGs. The camera is driven by a WorldSubsystem with all configuration centralized in a DataAsset — no code changes required to set up a fully functional camera in your project.

Key Features

Smooth Movement — Acceleration/deceleration system with configurable speeds and a Boost multiplier. Rotation and zoom use smooth interpolation.

Modular Feature System — Add or remove camera behaviors without touching core code. Each Feature is an instanced object configured in the DataAsset:

Edge Scrolling — Pan the camera by moving the cursor to screen edges, with pressure-sensitive force based on proximity.

Soft Zone Boundaries — The camera smoothly decelerates as it approaches map edges and comes to a full stop at the boundary. Slides along walls naturally. Configurable deceleration zone width.

Terrain Following — Automatically adjusts camera height to follow the landscape using Sphere Sweep tracing. Smooth height interpolation.

State Reset — Reset camera rotation and zoom to their initial values via bound keys.

Performance-First Design — The system stops ticking entirely when the camera is idle. Zero CPU overhead when no input is active. Input injection is stateful — duplicate calls are skipped.

Enhanced Input Integration — Full support for press strength (analog input), trigger events (Started/Triggered/Completed), and input injection for edge scrolling.

Blueprint-Friendly — The entire system is accessible from Blueprint. Set up a camera in 4 steps: create Input Actions, configure a DataAsset, add Features, call SetupCamera.

Attention: The environment is not included in the package!

Formats inclus