Hi there!
I’m trying to develop some sort of RTS game, but less complicated in Unity. So the first goal I set myself to get something done was to get a terrain (with high and low areas), and have one character being able to move to where I click with the mouse, properly animated (running animation, lets say). Well, I thought that maybe then I could start trying to implement a pathfinding system and other stuff.
As far as I know, there is little information on RTS development in Unity, so I did some reseach in several things to start to get my first goal done. Basically I modelled the terrain successfully, I have set a fixed camera that at least for now shows the entire map from perspective, and I imported a .fbx character, an animated teddy bear with the idle animation and the run animation I found in turbosquid.net for free.
What I did is write a script that first, locates the clicking point in the map through RayCasts. I guess that part works fine, and is essential in any movement of this kind. Added RigidBody component to the character in order to get more realism and to be able to walk up hills efficently, and a capsule collider too. But then, I tried to move the character with Vector3.Lerp function while it plays the “run” animation.
It does the job, but when walking up hills, it loses stability, and reacts just like a capsule (quite obvious), it was then I realized that “my method” of getting this done wouldn’t get me to a proper movement of the character through the map.
So, what do you think guys would be the correct way of getting this done? Which functions or aspects of the engine should I investigate? I’ve downloaded previously the Locomotion System to try it out and followed some tutorials, but looked like harder and more FPS, Third Person oriented, and everthing was being triggered with keys.
Thanks for reading and your help, and sorry for the annoyance!