Timeline for Unity RTS Single Selection Problem
Current License: CC BY-SA 4.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 2, 2019 at 19:47 | comment | added | Arthur | You can create a separate script for your player controller that you attach to the camera for example. In this script you can put the FindClickPos function. If your raycast hits a unit you save it in a local variable. You also perform the right click logic there and call MoveTo on the saved unit from FindClickPos. | |
| Oct 2, 2019 at 19:39 | comment | added | Kiyo | Thank you so much! I understand what you mean by not put the controller in the unit but where else should I put it? Should I create an empty and put it there? | |
| Oct 2, 2019 at 19:38 | vote | accept | Kiyo | ||
| Oct 2, 2019 at 19:35 | history | answered | Arthur | CC BY-SA 4.0 |