- Home /
How to move a player to a certain point?
Okay so my goal is to get a player to move to wherever the user clicks. So I have the raycast and everything set up, and I can get the point I want the player to move to, but I'm not entirely sure how to actually get the player to move there...
Like I know how I could get it to teleport there, but I obviously want it to "walk" there.
I'm not worrying about pathfinding yet, I just need to get the player to gradually move to the certain point.
Any suggestions?
Thanks a ton! :)
I answered this today, it would be using Vector3.Lerp, check this:
http://answers.unity3d.com/questions/336754/change-position-of-an-object.html
You might also find this link useful:
http://answers.unity3d.com/questions/335113/how-can-i-script-an-object-that-rotates-while-foll.html
There's a demonstration of a simple steering behaviour; turning and moving the character towards a goal point.