Box selection of actors
I'm planing to create a small game where the player can select created units (actors) on the map through the cursor/finger. Actually exactly like in games like Age of Empire etc.
What I currently have is only the visual "box" in the user interface. I have no idea at the moment how I can now select all actors that are within this box. Any ideas?
A function like 'Vector Between (actorVector, vector2, vector2` on a 2D map would already help a lot.
Ok, I got it.
What I did:
1) Wrote a new c++ function at my GameMode class that tells me if a actor location is inside my selection box.
2) Create this blueprint:
In your HUD blueprint graph:
3 additional methods to your HUD blueprint:
In your controller blueprint graph:
And that's how it looks like then:
answered Mar 31 '14 at 03:57 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here