PDA

View Full Version : Joystick / GamePad - How to Free Look? [Solved]


ChadReitsma
03-12-2012, 12:39 AM
Hi Everyone,
I've been working on a little HL:2 DM Mod, and am now having an issue with the GamePad/Joystick ViewAngles.

I enable the GamePad inside the mouse options but when I bind any axis to "LOOK UP / LOOK DOWN" it does not change the viewAngles :(


Left and Right work perfectly (even without binding them) which leads me to think that it might be hard-coded somewhere?? Also pressing an Analog stick up/down makes me move Forward/Backward... which again, leads me to believe it's hard-coded somewhere...

Could anyone point me in the right direction? Or offer any advice?

Thanks in advance for your help!

Cheers,
Chad

ChadReitsma
03-12-2012, 01:23 AM
Ok, duhhhhh...

I just realized that Source had some code that doesn't allow FreeLook if MouseLook is enabled! HOWEVER, because I have integrated the "Over the Shoulder" Free Aim method, it was always on.

If you are having a similar problem, simply find: CInput::AdjustPitch

There is an IF statement that says:
if ( UsingMouselook() == false )

Just move all of the code that was inside of that IF statement outside of it, and you're set! :)