Hi, m using SplineController Script and attaching it to my camera,Actually Camera is moving around a building and i want camera to look at building Continuously during its movement. Right now camera is looking straight… i don’t know how to modify in this script to do so…plz help
using UnityEngine;
using System.Collections;
public class LookAt : MonoBehaviour {
public Transform target;
// Update is called once per frame
void Update () {
transform.LookAt(target);
}
}
You just have to assign this script to the camera and the building as the target and it will automatically look at it, if you want a specific spot at the building you could place an empty gameobject at that position and assign it instead. For me it worked like this.