override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { // gives cameracontroller script the current rotation's movement direction and axis to become flat on camera = animator.gameObject.GetComponent <cameracontroller>(); camera.move = Vect; camera.Vect = flatter; }
// Start is called before the first frame update void Start() { // sets the true position of the object and finds the main camera position = transform.position; camera = GameObject.Find("camera").GetComponent <cameracontroller>(); }