This project demonstrates how to use the MG Spatial Selection plugin inside a real Unreal Engine level.
It shows how to achieve high-performance, real-time spatial selection of actors using a hybrid CPU/GPU architecture.
Original Plugin: https://github.com/cem-akkaya/MGSpatialSelection
The demo includes:
- Material-Based Selection: Custom post-process effects using the
MG Selection Masknode. - Interface-Driven Interaction: Example units implementing
IMGSpatialSelectionInterface. - Enhanced Input Integration: Ready-to-use input mapping for box selection.
- Configurable Settings: Examples of MPC integration and decay effects.
If you encounter any issues, please open an issue on the plugin repository.
Feel free to contribute!
- Download or clone this repository.
- Ensure the MG Spatial Selection plugin is in the
Plugins/directory. - Right-click the
.uproject→ Generate Project Files. - Build the project using Visual Studio or Rider.
- Open in Unreal Engine.
- Open the
Lvl_TopDownmap and Play In Editor.
Lvl_TopDown: Simple top-down selection example.
BP_TopDownCharacter: Manages theMGSpatialSelectionComponentfor selection.SelectionTestActor_BP: Example of a selectable actor implementing the interface.
- High-Performance Selection: Uses native
UBoxComponentfor efficient overlap detection. - Dynamic Terrain-Aware Mask: Pixel-perfect visuals that follow terrain geometry without CPU raycasts.
- MPC Integration: Real-time shader updates via Material Parameter Collections.
- Post-Selection Decay: Smooth "fade-out" effects when releasing the selection.
![]() RTS Box Selection in Action |
![]() Terrain-Aware Selection Mask |
This demo is only the showcase.
Download the full plugin here:
https://github.com/cem-akkaya/MGSpatialSelection
This demo project is released under the MIT License.
Commercial use is allowed as long as the copyright notice remains.
If this project helped you, consider supporting development:


