I want a monster in my game to look only left and right at the target, so for example if my target jumps the target wont look up at him in his jump?
Im using this as a start:
var lookattarget : Transform;
function Update () {
transform.LookAt(lookattarget);//this looks left/right/up/down and I want it to look only left/right
}
I guess I would have to use a vector 3 for this but im not exactly sure how to script it.