I’m doing a camera viewing around with translation and rotation. I want my camera to go back to initial position and the viewing angle, allow me to loop the camera again and again, going through the same path.
how do I set the angle view of camera in initial position?
The easiest way to do this is to save the initial rotation in a variable of type Quaternion. Then, you can restore that rotation whenever you need to:-
var initRotation: Quaternion;
function Start() {
initRotation = transform.rotation;
}
...
transform.rotation = initRotation;