I am trying to use a UI image to point towards my game objective in a topdown 3d style setup, the issue I am having is my compass is only half working and is tracking my object on the x and y axis instead of the x and z.
Any ideas or hints where I am going wrong?
Vector3 compasImage = target.transform.position;
transform.LookAt(transform.position + transform.forward, compasImage - transform.position);