RTS Unit Template

Silvan Teufel - 代码插件 - 2022/11/16

Create your own RTS Unit

  • 支持的平台
  • 支持的引擎版本
    5.0 - 5.1
  • 下载类型

Create your own RTS Unit with the RTSUnitTemplate-Plugin, which is written in C++.

V 1.2.1

  1. Bugfix in Unitbehavior (UnitControlStateMachine)
  2. Added Blendspace Animations with DataTable

V 1.3.2

  • Added a Statemachine and second Controller Class for Camera
  • Live Switch to Third Person Camera possible.
  • Bug fix: Rotating while locked to Character: Cam will move with Character now
  • Minor Fixes.
  • Switch to Enhanced Keyboard Inputs

V 2.0.0

  • Pathfinding with Dijkstra

For Gameplay preview please see the Videos below:


For Camera preview please see the Video below:


For Pathfinding preview please see the Video below:


For Installation check the Documentation:



Or check the Documentation:


Choose if your Unit is:

  • Enemy or Friend
  • Range
  • Health
  • Attack Damage
  • MovementSpeed
  • Sight
  • IsFlying
  • .... and more, see the Documentation!

ControllerBase + CameraControllerBase:

CTRL + E -- Rotate Cam Right (works also when Cam is locked to Unit )

CTRL + Q - Rotate Cam Left (works also when Cam is locked to Unit )

CTRL + Left Mouse Click -- Move Cam to Mouse Position

CTRL + W -- Zoom Cam In

CTRL + S -- Zoom Cam Out

CTRL + HOLD SPACE -- Fast Zoom Out to Position

CTRL + SPACE + Left Mouse - Move Cam to Mouse Position

Mouse to Screen Edges -- Move Cam to Mouse Position

Right Click when Unit Selected -- Move Unit

Shift + Right Click when Char. Sel. -- Move Unit through Waypoints

CTRL + G when Unit Selected -- Lock Unit on Character

CTRL + T when Unit Selected -- Switch to Third Person Mode

Press A when Character Selected - toggle Attack

Press A + Left Click when Character Selected - Move to Position and Attack

Press A + Left Click on Enemy - Focus this Enemy

HOLD TAB -- Show Control-Widget

When Character is Selected:

A - Set Unit into Detected Mode

A + LeftClick - Move to Position and Attack everything in your way

If RTSUnitTemplate is installed, the Classes can be used as Parent Class in Blueprint, so all functions from this Class are available in Blueprint. Just use one of the Following Classes as Parent Class and or just choose them in your GameMode Blueprint. Category = RTSUnitTemplate / TopDownRTSCamLib

ALL 3D-Models, Animations and Sounds are changeable via Blueprint.

3D-Models and Animations are Epic-Games Content


Features: (C++ ParentClasses)

  • CameraBase
  • UnitBase
  • UnitControllerBase
  • ControllerBase
  • CameraControllerBase
  • HUDBase
  • PathProviderHUD
  • DijkstraCenter
  • NoPathfindingArea
  • UnitBaseHealthBar
  • Projectile
  • SelectedIcon
  • Waypoint

Code Modules: (Please include a full list of each Plugin module and their module type (Runtime, Editor etc.))

  • RTSUnitTemplate [Runtime]
  • Core, CoreUObject, Engine, InputCore
  • HeadMountedDisplay, NavigationSystem
  • AIModule
  • UMG

Number of Blueprints: 24+ (Most times Based on C++ Class, used for Example)

Number of C++ Classes: 10

Network Replicated: No

Supported Development Platforms: Tested in Windows

Supported Target Build Platforms: Tested in Windows

Documentation: http://wiki.teufel-engineering.com/

Example Project: https://www.youtube.com/watch?v=ESS5PYtr9mU