hey guys i want to give my camera a new possition when ontriggerenter it shoud be working but it doesnt i add a empty game object and attached this script to it so when the game object gets collided with somthing or enything it wil hive the camera in the game object slot the possition of the gameobject
but when i collided it with somthing it does not possition my camera on the possition of the game object do you know how to fix this?
var mainCamera : GameObject;
function Awake() {
mainCamera = GameObject.FindWithTag("MainCamera");
}
function OnTriggerEnter (Collision : Collider) {
mainCamera.transform.rotation = transform.rotation;
}