Rotate GameObject To Look Down

Hello

I have a simple script that is supposed to move a GameObject to a certain point and look down on that point from above.

My script is partially working; the GameObject is moving to the correct point but its not looking down from above. So the rotation is wrong. The GameObject flips upside down.

Can you help me get my GameObject to look straight down?

public class MoveTo : MonoBehaviour {

	private Vector3 	targetPosition			= new Vector3(5, 10, 5);
	private Quaternion 	targetRotation			= new Quaternion(90, 0, 0, 0);
	private float 		speed 					= 6f;

	void LateUpdate () {

		transform.position 	= Vector3.MoveTowards(transform.position, targetPosition, Time.deltaTime * speed);
		transform.rotation 	= Quaternion.Slerp(transform.rotation, targetRotation, Time.deltaTime * speed);
	}
}

the problem here is that you are trying to use the Euler value as Quaternion.I think you gave the value 90 int Quaternion(90,0,0,0) as 90 degree which will not work.If you want it to rotate 90 degree you have to give it in Euler value.Know the difference between Euler and Quaternion here

For now you can change the code to this

public class MoveTo : MonoBehaviour 
{ 
    Vector3 targetPosition = new Vector3(5, 10, 5);
    Quaternion targetRotation = Quaternion.Euler (90, 0, 0);
    float speed = 6f;
    float SLerpSpeed=0.5f;
	
    void LateUpdate () 
    {			
        transform.position = Vector3.MoveTowards (transform.position, targetPosition, Time.deltaTime * speed);	
	transform.rotation = Quaternion.Slerp (transform.rotation, targetRotation, Time.deltaTime * SLerpSpeed);
    }
}