• How to Lerp the Vector for CalcView?
    1 replies, posted
How can I make a smooth camera movement. By doing LerpVector( %, vec1, vec2) I know But if I make a time baricade like [lua] -- in CalcView hook. if !self.NextLerp or self.NextLerp < CurTime() then self.Lerp = LerpVector( %, old_vec, new_vec) self.NextLerp = CurTime() + 1.5 end -- calcview pos = self.Lerp etc. [/lua] the camera movement is not smooth, it is laggy and stuttering. How can I make it so that it is smooth and not stuttering? ( I want the camera movement to be delayed and lerped while the spectated entity moves. )
[lua]current = LerpVector( FrameTime(), current, target );[/lua] Get rid of that condition, you don't need it. Adjust FrameTime() to change how fast it follows. Another option is a velocity based camera. Which I'd prefer as it'd give you more control.
Sorry, you need to Log In to post a reply to this thread.