• Binding view movement to one axis.
    6 replies, posted
I need to restrict a players view to one axis of movement. The problem is that I have CalcView already being used as a function, how would I restrict a players look movement to the pitch angle?
Okay, I got it to work but the player still moves on the pitch angle and I need to stop them from moving on that angle. any help?
Try CreateMove.
Okay, I have [lua] function NoPitch(cmd) cmd:SetViewAngles(0,angles.y,angles.r) end [/lua] and a hook to call it but it gives me the error angles = nil, how do I get the players current view angle?
cmd:GetViewAngles()? [url]http://wiki.garrysmod.com/?title=CUserCmd[/url]
Okay figured it out, thanks 20 smartness. I had issues with my angle structures and I didn't understand them. I eventually figured it out and I think i'm incredibly stupid.
Sorry, you need to Log In to post a reply to this thread.