(39) 's Extra Blueprint Nodes for You as a Plugin, No C++ Required!

HUD Get Actors In Selection Rectangle

Hi there!

The only node you need is one, which I contributed to the engine a while back:
.unrealengine.com/latest/INT/BlueprintAPI/HUD/GetActorsinSelectionRectangle/index.html

And you can just use DrawHUD itself.

You should not be using that hitbox code with the node above.

There’s some detailed discussion on the node here:

Use the customization options that I"ve provided to control whether you pick up actors that are only partially intersected, or have to be fully intersected.

The underlying code uses UE4’s bounds rect for that actor, so actors at unusual rotations or shapes may have a very large rectang;e on the screen and therefore be drag selected either unexpected or not at , depending on the settings you picked. The node was intended for things like characters and items with precise bounding boxes, not large mountains and rivers :slight_smile:

If your unit seems to be getting selected when you don’t want, make sure to only include components with collision so that the long flowing cape of your character, or hair, doesn’t abnormally extend the bounding rect.

Enjoy!

:heart:

PS:

Basic Usage

For other readers, node is not part of Victory BP Library, it is in the main engine!

You can use it right now by making a BP of a HUD class and then changing your game mode to use your new HUD BP.

Then create the DrawHUD node and add the node post is focused on.

For drawing of the marquee / selection rect, you can calculate the bounds from the anchor and cursor position and draw lines using one of my other contributes to the engine, the Draw Line With Thickness HUD node.

:heart: