Simple lookat issue

I have an issue with lookat and it is driving me mad. Everytime I lookat it seems to veer off my target by a set amount, I can’t figure why. When I change targets it still veers.The pivot of the object is in the centre and pointing down the z axis.

So I started just trying to make it point at zero. If I put the look in the update it does arcs through 0,0,0 but doesn’t get caught at 0,0,0 like I would expect.

All I am trying to do is point at an object and keep going in straight towards it. I don’t know why it isn’t working and I know it must be something stupid. Please help.

    // Use this for initialization
    void Start ()
    {
        Destroy (gameObject, 10.0f);
        transform.LookAt (Vector3.zero);
    }
   
    // Update is called once per frame
    void Update ()
    {
       
        transform.Translate (transform.forward * Time.deltaTime * 2.5f);
    }

Turns out I answered my own question.

Space.world

1 Like

Someone, who kept his question instead of “IM STUPID, HOW DO YOU DELETE?!??!”

1 Like