• EyeAngle Limitation
    7 replies, posted
I need the player to not lower and lift the camera. I could move the camera only to the right and to the left... (goodeng) BAD: [IMG]https://pp.userapi.com/c837137/v837137900/51dc2/QB_hTCMbD1s.jpg[/IMG] [IMG]https://pp.userapi.com/c837137/v837137123/45ab1/sPTwu24j2-8.jpg[/IMG] GOOD: [IMG]https://pp.userapi.com/c837137/v837137999/570dc/fnT9N6jlu84.jpg[/IMG] (for v k yes) [IMG]https://puu.sh/wreRP/ed476987ad.png[/IMG] I found such a solution, but it has "lags" [IMG]https://puu.sh/wrfis/4b39f0d621.gif[/IMG]
Use a CreateMove hook and cmd:SetViewAngles instead.
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/CalcView]GM:CalcView[/url]
[QUOTE=kantalketche;52389174]Use a CreateMove hook and cmd:SetViewAngles instead.[/QUOTE] good. thx [IMG]https://puu.sh/wrijU/faf9bebc49.png[/IMG] (no, it's not working)
[QUOTE=RedWo;52389285]good. thx [IMG]https://puu.sh/wrijU/faf9bebc49.png[/IMG] (no, it's not working)[/QUOTE] Notice how I said "CreateMove" but you're using "StartCommand".
If you use CalcView it's a lot easier. CalcView is designed for what you're doing, so I highly recommend it. [CODE] hook.Add( "CalcView", "ViewTest", function( ply, pos, ang ) return { origin = pos + Vector( 0, 0, 100 ), angles = Angle( 90, ang.y, 0 ), drawviewer = true } end ) [/CODE] [editline]23rd June 2017[/editline] Sorry, I misread... so you want the AIM, not the VIEW to be limited.
[QUOTE=MPan1;52392566]If you use CalcView it's a lot easier. CalcView is designed for what you're doing, so I highly recommend it. [CODE] hook.Add( "CalcView", "ViewTest", function( ply, pos, ang ) return { origin = pos + Vector( 0, 0, 100 ), angles = Angle( 90, ang.y, 0 ), drawviewer = true } end ) [/CODE] [editline]23rd June 2017[/editline] Sorry, I misread... so you want the AIM, not the VIEW to be limited.[/QUOTE] Thx. I decided this in this way
This way doesn't stop the player from aiming wherever they want though. I thought you wanted them to only aim in a straight line: [IMG]https://pp.userapi.com/c837137/v837137999/570dc/fnT9N6jlu84.jpg[/IMG]
Sorry, you need to Log In to post a reply to this thread.