Hi there.

I am trying to use a raycast from the main camera in my scene to the mouse cursor point then using the vector 3 from this cast to create a direction from a missile object to the vector3 created. The object seems to be rotating towards this point but only on two axis so it never fly’s down towards the point and merely circles it at a certain distance above the ground! Here is the code I am using:

```
var missileSpeedMax: int = 40;
var missileSpeed: int = 0;
var initProcedureActive: boolean = true;
var Target;
var leftRot90;
var hit: RaycastHit;
var clickPos: Vector3;
var initTimerEnd: boolean = false;
var point : Vector3;
function Start () {
missileSpeed = 1;
if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition),hit, 1000))
{
clickPos = hit.point;
}
InitTimer();
}
function InitTimer() {
yield WaitForSeconds(0.2);
initTimerEnd = true;
}
function Update () {
leftRot90 = Quaternion.Euler(transform.localRotation.x,transform.localRotation.y - 90,transform.localRotation.z);
var rotationLookAt = Quaternion.LookRotation(transform.position, hit.point);
if (missileSpeed <= missileSpeedMax)
{
missileSpeed += 1;
}
if (initTimerEnd == true)
{
transform.rotation = Quaternion.Slerp(transform.rotation, rotationLookAt, Time.deltaTime * 10);
}
transform.Translate(Vector3.up * Time.deltaTime * missileSpeed);
}
```

}

I suspect the coordinates are not being properly converted from 2d to 3d space. Can anyone help with this?