• Look Y axies only works but choppy
    4 replies, posted
function GM:InputMouseApply( cmd, x, y, angle )         angle.pitch = angle.pitch +y/50         cmd:SetViewAngles( angle )     return true end --This works but it's choppy while looking all the way up or down. --I know this is a crude way of diong it but im a noob --How do i do this the right way? --How would i lock X so it can't be ued even with +left or +right? --GM:PlayerBindPress has no mouse movment? ued it to restrict using binds but cmds still work.
The flickering you see is the orientation change because the players view is exceeding the maximum pitch for the vertical FOV. By clamping between -89 and +89 you can prevent this: angle.pitch = math.min( math.max( angle.pitch + y / 50, -89 ), 89 )
Wow I'm dumb, I should have known, thanks man.
No, it's an easy mistake to make; it's more an oversight in the source engine! I should probably add a note to the wiki about it actually.
Just needed to ad angle.yaw = 0 to lock X
Sorry, you need to Log In to post a reply to this thread.