I have a standard camera in my scene. With standard I mean the camera you get when you click right mouse > Camera, with no modification except for the transform position and rotation. Then I attached to the camera this simple script:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraController : MonoBehaviour {
public GameObject target;
public Vector3 translationOffset;
public Vector3 rotationOffset;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.position = target.transform.position + translationOffset;
transform.LookAt(target.transform);
transform.Rotate(-rotationOffset);
}
}
the result I have is this:
Why my camera is doing that? It may be worth noticing that everything was working fine, but at some point i clicked on "reimport all assets" and it started this weird behaviour. How can I fix? Thanks a lot.
