how to Move or Rotate Main Camera

  1. I made “CameraCtr” C# script
  2. and i attach “CameraCtr” to Main Camera.
    and now what?
    i want to move or rotate Main Camera…
    please, someone help me.

using UnityEngine;
using System.Collections;

public class CameraCtr : MonoBehaviour {

void Start () {

}
void Update () {

}

}

Good solution, not sure why I left that point out! thanks @Bunny83

1 Answer

1

You could attach the following Script to your Camera for X-Rotation, the other axis are the same in green.

using UnityEngine;
using System.Collections;

public class CamRotation: MonoBehaviour {

	public float rotationSpeed = 10;

	void Update() {
		Vector3 rotation = transform.eulerAngles;

		rotation.x += Input.GetAxis("Horizontal") * rotationSpeed * Time.deltaTime; // Standart Left-/Right Arrows and A & D Keys

		transform.eulerAngles = rotation;
	}
}

You, So Great!!! Porblems solved!!!!!!! Yeah!!!!!!