- Home /
simple RTS unit movement script help
Hello
I am trying to make the player select a object and make the object move to were the player clicked. Im regular,somewhat novice to scripting,i already searched for answers,but no solutions at all to my problem.im not that familiar with raycasting,i definetly dont know nothing about raycasting.lol So how can i make that? Remember im very new to Unity.
Thanks in Advance
2D or 3D? How do you move things - transform.translate, charcontroller, physics, etc?
3D physics,there are very little tutorials about RTS games in unity,some are very old,it´s kinda dificult to learn RTS in unity. my problem is that i dont know were to start,maybe using vector?
An RTS can be complicated to create, if you are new to unity it's going to be very frustrating for you if you start with an RTS. Try making something a lot simpler and then by the time you have finished that you will have learn enough to be able to start making your RTS.
But if you want to start with this you are deffinitly going to have to learn how raycasting works, try checking out the unity reference page about raycasting and make a few simple raycasts to detect objects under the mouse. I'm guessing you want to be able to select varous units at the same time. So you would need to create a 'Drag' function to drag with the mouse and create a selection box.
Then moving the units will require you to create paths for each unit, I use iTween for paths I recommend you try it, it is free in the asset store and there are lots of examples on their web page.
thanks,learned a bit raycasting,looked at some assets,and finally! and yeah RTS is dificult to do in unity,but after some coding we can find our own answer!
Your answer
Follow this Question
Related Questions
manually installing unity 3d 1 Answer
my game is really slow? 2 Answers
Decal script not recognized by bullet marks script 0 Answers
[Network]When a barrel was explored another people can't see! 0 Answers