system
1
I found a really basic script on the Unity website for making an object to aim at another object. It will aim at the object no matter where it goes so is it possible to limit the rotation of the camera so it can only rotate in between 2 numbers of rotation?
Here’s the code
var target : Transform;
function Update (){
transform.LookAt(target);
}
For a better understanding what I’m doing is making a static camera sit in a room and aim at the player then when the player goes to another room it switches to a new camera, but my problem is if my character goes into certain areas the camera can bug out a little bit by trying to aim when I don’t want it to aim, I just want to be able to limit where the camera is aiming at.