Deplacement point & click help

Hey I want a point & click deplacement like LoL, dota or diablo for my project.

I already have a script but the problem is:

The vitess is always the same (my character took 2 second to do 1/50/200 meters), and for example I’d like to have a constant vitess for a constant distance. Like 2 second / 3 meters.

This is my script

var vitesseMouvement:float;
private var targetPosition:Vector3;
var obj1: Transform;

function Update(){

var distance = Vector3.Distance(obj1.position, Input.mousePosition);
var playerPlane=new Plane(Vector3.up, transform.position);
var ray=Camera.main.ScreenPointToRay(Input.mousePosition);
var hitdist = 0.0;
if (playerPlane.Raycast (ray, hitdist)){            
var targetPoint = ray.GetPoint(hitdist);
var targetRotation=Quaternion.LookRotation(targetPoint-transform.position);





The result is, my character stop walking he just teleport to my mouse click

Define a speed variable (units per second). Then replace your Lerp() with MoveTowards():

transform.position = Vector3.MoveTowards(transform.position, targetPosition, speed*Time.deltaTime);

I suggest instead of Lerp, use transform.Translate or Mathf.Lerp because then you can define T which is time. Tham means you can say go from here to here in some amount of time.