I'm stuck at creating a selection box for an RTS game with blueprints

I’m stuck right now. I tried almost everything. Creating a collision box, sphere everything and also traces. My pc got stuck when I tried to create two loops with single line trace to go over all dots. What else is available? I have HUD selection ready


What exactly doesn’t work when using a collision Box? An all-channel-overlapping-Box should be doing job (I would guess, I haven’t tried anything like that).
Some information on situation would be nice :slight_smile:

Hey ,

Can you be more descriptive about what you are trying to achieve and what problem you are running into? Thanks!

I’m trying to create a selection box. It basically draws a box and anything within that box gets selected and I can move it or do stuff with it. My project is blueprints only, so I can only use that.

How do I exactly get box position and extent. So far it only gives me landscape and not any other object. Say my mouse is placed at (0,0) and (500,500) how would you get position and extent

I’m trying box selection trace, but it has an offest I can’t seem to fix.

There is an offset like this: Imgur: The magic of the Internet

and also this is when I remove half size http://i.imgur.com/UWf28gu.jpg . I need a better equation for single box trace by channel. If anyone knows how to get starting position, end position and half size right. I have two vector points

You should be able to do a Get Hit Result Under Cursor at mouse down and store that to use as box top left then for extents just subtract original position from hit result under mouse for current mouse position. Make sure to handle a large Z size for your box.

Hey ,

Have you found a way to create selection box way you want? If not, UE4 user created a BP node that he posted about here:

Ya I used a combination of Canvas and some math to get it to work! Thank you for link I’ll check it out.