Skip to content

MabLab-Dev/UE5_Plugin-CompassKit

Repository files navigation

UE5 Plugin CompassKit

CompassKit is an Unreal Engine 5 plugin that provides an in-game compass and navigation marker system for tracking objectives, actors, and directions at runtime.

It supports dynamic actor tracking, cardinal direction markers, and widget-agnostic navigation workflows while remaining lightweight, extensible, and blueprint-friendly.

Check it out on Fab

Note

CompassKit is designed to be a widget-agnostic navigation system that manages marker state and provides runtime projection data for different navigation widget implementations.

The current release focuses on compass bar widgets, with future updates planned for screen-space indicators and additional navigation systems.

Features

  • Dynamic runtime marker system
  • Moving actor tracking
  • Cardinal direction markers
  • Point/world location markers
  • LocalPlayerSubsystem architecture
  • Blueprint-friendly API
  • Runtime projection helpers
  • Automatic cleanup for destroyed actors
  • Example gameplay map included
  • Example compass bar widget included

Demo

YouTube Link

2.CompassKitV1_Demo_Compressed.mp4

Quick Start

1. Add the Compass Widget

Add the provided WBP_CompassBar widget to your player's existing HUD widget.

2. Identify the Player and Target Actor

Markers are added for a specific player and track a target actor or world location.

To create a marker, you need:

  • the player controller that will see the marker
  • the actor or location to track

3. Get the Compass Subsystem and Add a marker

Create a CompassMarkerData struct describing the target actor or world location, then call AddMarker from the player's compass subsystem.

CompassKitV1_UsageExample

Marker Types

Cardinal Markers

Directional markers independent of world position.

Example uses:

  • North / East / South / West
  • Directional indicators

Point Markers

Track:

  • Moving actors
  • Static world locations

Point markers are updated automatically at runtime.

Note

Support for area markers is planned for future updates.

Projection Modes

Perspective_3D

Uses directional projection for a more spatial compass feel.

CompassKitV1_Perspective3d

Flat_2D

Uses direct angular mapping for a traditional flat compass feel.

CompassKitV1_Flat2D

Example Content

The plugin includes an example gameplay map demonstrating:

  • Dynamic marker spawning
  • Multiple simultaneous markers
  • Moving actor tracking
  • Automatic marker cleanup
  • Runtime add/remove workflows

The example gameplay consists of physics-based balls being spawned into the world while the player tracks and catches them using the compass system.

Included Assets

CompassKitV1_AssetList

Architecture Overview

CompassKit uses a LocalPlayerSubsystem to manage marker state and runtime navigation data. Navigation widgets subscribe to the subsystem and generate their own marker widgets using runtime query functions.

CompassKitV1_ArchitectureDiagram

Blueprint API Overview

Widget Subscription

A navigation widget must subscribe in order to receive marker updates.

  • SubscribeNavigationWidget
  • UnsubscribeNavigationWidget

Marker Lifecycle

  • AddMarker
  • UpdateMarker
  • RemoveMarker
  • ClearMarkers

Runtime Queries

These runtime query functions are designed to support custom navigation widgets beyond the included compass bar implementation.

  • GetMarkerRuntimeCache
  • GetMarkerDistance
  • GetMarkerProjectedOffset
  • IsMarkerWithinView

Marker Widget Interface

CompassKit includes a ICompassMarkerVisualInterface for marker widgets, to simplify communication between a navigation widget and its marker widget implementations.

Included interface functions:

  • InitializeFromMarkerData
  • UpdateDistance

This allows custom marker widgets to react to runtime marker data without tightly coupling widget implementations to the subsystem.

Notes

  • The markers are added/removed for a specific player hence are managed by a local player subsystem
  • The subsystem uses tick to continuously update marker positions, but tick is only active if a navigation widget is subscribed and there are markers to be tracked.
  • By default CompassKit calculates marker projections relative to the player's camera. Projects can optionally override this at runtime using SetProjectionReferenceOverride().
  • CompassKit is designed to encourage custom navigation widget implementations.

Installation

  1. Install CompassKit using one of the following methods:
    • Install from Fab to make it available to all projects in your engine installation (Engine Plugin)
    • Copy the plugin into your project's Plugins folder to make it available only to that project (Project Plugin)
  2. Enable CompassKit under Edit → Plugins
  3. Restart the editor
  4. To access the included example content:
    • Engine Plugin: Enable Show Plugin Content and Show Engine Content in the Content Browser
    • Project Plugin: Enable Show Plugin Content
  5. Open the example map Lvl_CompassKitTest

Requirements

  • Unreal Engine 5.7

Note

This initial release targets Unreal Engine 5.7 only. Backward compatibility for earlier UE5 versions will be added in future updates.

License

This project is licensed under the MIT License.

Support

Bug reports, feature requests, and general feedback are welcome through the GitHub Issues page.

About

A simple and extensible compass with markers.

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors