Search Unity

SmoothFollow

Discussion in 'Scripting' started by bomber, Apr 7, 2008.

  1. bomber

    bomber

    Joined:
    Dec 20, 2007
    Posts:
    27
    I'm at work so if I've used the wrong file name I'll update when I get home.

    I'm looking to use the SmoothFollow.js that comes in the Asset standards Camera folder but I need to stop the camera from doing a 'Linda Blair'.. To put some human physical restriction onto it's rotations in the X and Y axis...

    I need some x max(right) and min(left)rotations say 150 and -150 and some y max(up) min(down) rotations say 90 and -20.

    I'm after the camera following the target around but if it goes out of his physical movement ability for him to lose sight of it, unless of course he then rotates the turret.
    Or a target might be called out to him where he looks around towards it but can't see it because of his restictions and waits for a set time for it to apear before turning back to concentrate on the target he's tracking.

    Can anyone help me on this ?

    regards

    Simon