I've gone through Unity's documentation for Quaternion.LookRotation, but I didn't get the full understanding of how it works.
- What is the meaning of Creates a rotation with the specified forward and upwards directions?
- And if I have to rotate my object in X axis I have to modify both X and Z axis
Vector3 lookAt = new Vector3(relativePos.x, 0, relativePos.z); transform.rotation = Quaternion.LookRotation(lookAt);, why can't I only just modify the X axis directly to rotate?