change camera position unity code example
Example 1: unity rotate object relative to camera
transform.rotation = Quaternion.LookRotation(-Camera.main.transform.forward, Camera.main.transform.up);
Example 2: unity background camera change
using UnityEngine;
using System.Collections;
public class Myclass: MonoBehaviour
{
public Color Red = Color.red;
public Camera cam;
void Start()
{
}
void Update()
{
cam.backgroundColor = Red;
}
}