Sending units

Hello everyone!
i was wondering about how to acomplish this…
i have two buildings, and i want to send units from one to the other one… drag and dropping with a mouse or finger.
anyone have any idea on how to achieve this… or a starting point?

Lets start with mouse. On mouse click do some line trace that would check do you clicking unit, then you have many ways to move your unit. For example, you can create some actor that always moves with your mouse at screen and when you click at unit attach him to this actor, then detach after release. For this you should use:


This node deprojects screen 2d position to your world 3d coordinates, it would help you to make that actor which would move with your mouse. Remember to make him invisible:)

After release, check does your unit overlap another building and do what you want otherwise, also use your imagination:)

Good luck!

P.S: For touch you can think something similar.

wonderful!!! thank you very much for your early answer! i’ll give it a try

:smiley: thank you

Hello, if you don’t expect any other answers, please make it resolved by choosing answer.