So i want 2d plane to move towards another plane and rotate it, but its rotating only when object is null. Thanks.
void Update ()
transform.Rotate(0, 2, 0);
player = GameObject.FindGameObjectWithTag("Player");
transform.Translate(Vector3.forward * Time.deltaTime * speed);
This is because
Transform.LookAt() is quite different from
Translate() are sort of incremental. They take the existing coordinate system and modify it a little bit.
LookAt(), on the other hand, is not incremental at all, it is absolute. It completely disregards the previous rotation of the coordinate system, and sets it anew. So
Rotate() completely destroys what