|
so i have a sniper rifle and my aim down sights is a combination 2 scripts, one that changes the main cameras field of view and another that plays an animation to bring the sniper to eye level. both while holding right click the FOV works and the animation stops before it reaches eye level sometimes it will jerk and get stuck also if i have maxmize on play selected it will always jerk or any other size then 2 by 3 for the animation below var AnimName ="scopeinsniper"; //private var resetTime = .0000000000000000; var useBackwards = true; function Update (){ if(useBackwards==true){ if(Input.GetMouseButtonDown(1)){ animation[AnimName].speed = 2; //animation[AnimName].time = resetTime; animation.Play(AnimName); } if(Input.GetMouseButtonUp(1)){ animation[AnimName].speed = -2; //resetTime =animation[AnimName].time; animation[AnimName].time = animation[AnimName].length; animation.Play(AnimName); for FOV public var FOVIN :float = 35; function Awake(){ } function Update () { } if(Input.GetMouseButtonUp(1)){ }
(comments are locked)
|
