Hi. I’m making a platformer and I want the camera to rotate. I’m doing this via animator. For some reason, when I start the scene, it rotates, then goes back to normal and won’t rotate again this is what I’m doing
using UnityEngine;
using System.Collections;
public class CameraBrain : MonoBehaviour {
public Animator anim;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter2D (Collider2D collision)
{
if (collision.gameObject.tag == "rotate") {
anim.SetBool ("Rotate", true); }
if (collision.gameObject.tag == "normal_View") {
anim.SetBool ("Rotate", false);}
}
}
Can anybody help please?