|
I'm making a turn based game and everything has been going fine until i got stuck on this problem. I need the player (With a rigidbody) to move to a selected cell. I have it working with transform.position but the player just snaps to the cell, whit i want him to slowly move to it. I tried rigidbody.MovePosition but it doesn't seen to work properly. Is it wrong to use rigidbody.MovePosition are there any other way's ???
(comments are locked)
|

Are you moving the player over time or are you instantly moving the player to a position instantly.
I think he means over time " i want him to slowly move to it"
Have you seen this? May be what you're looking for :)
http://answers.unity3d.com/questions/14279/make-an-object-move-from-point-a-to-point-b-then-b.html
Lerp is nice and all, but I find myself using
MoveTowardsmore often as it gives a consistent speed and moves exactly to the designated position meaning anif (pos == tartegpos)statement is valid, which is very convenient. Lerp will give nice ease in and out, but that's not always a desirable effect.Well, if your lerp is going from point a to point b then Lerp will give you consistent speed. It'll only give you the 'ease-in-ease-out' thing if you are using lerp to snap to a moving object.