FAQ  •  Register  •  Login

Screen shake when shooting

Moderator: Inside3D Admins

<<

JasonX

Posts: 300

Joined: Tue Apr 21, 2009 2:08 pm

Post Sun Apr 10, 2011 7:24 pm

Screen shake when shooting

Where can i change the value?
<<

leileilol

User avatar

Posts: 2400

Joined: Fri Oct 15, 2004 3:23 am

Post Sun Apr 10, 2011 9:53 pm

self.punchangle_x
<<

JasonX

Posts: 300

Joined: Tue Apr 21, 2009 2:08 pm

Post Mon Apr 11, 2011 1:59 am

By using this on, let's say, "i get hit", can i have the same effect?
<<

lth

User avatar

Posts: 144

Joined: Thu Nov 11, 2004 1:15 pm

Post Mon May 02, 2011 7:39 am

Yes. Punchangle is a field that is added to the player angles and gradually faded back to '0 0 0' by the engine. Very large punchangles look very silly since they can reveal bits of the viewmodel that are not supposed to be seen.

Also, you can't alter the rate punchangle fades back in QC (well... without re-implementing it in QC).
<<

blubswillrule

User avatar

Posts: 68

Joined: Mon Oct 04, 2010 9:08 pm

Location: Lincoln, California

Post Mon May 02, 2011 8:58 pm

I'm wondering if the way it slowly fades punchangles back to '0 0 0' can be used to fade fog values from one to another...

perhaps, if (fog_r < desired_fog_r)
fog_r = fog_r +1
probably not how punchangles work, just going a bit off topic haha, sorry.
A truly rewarding experience for an AI coder: watching your ai navigate the map... makes all the time invested in the code worth it :)
<<

metlslime

Posts: 310

Joined: Tue Feb 05, 2008 11:03 pm

Post Mon May 02, 2011 10:20 pm

blubswillrule wrote:I'm wondering if the way it slowly fades punchangles back to '0 0 0' can be used to fade fog values from one to another...

perhaps, if (fog_r < desired_fog_r)
fog_r = fog_r +1
probably not how punchangles work, just going a bit off topic haha, sorry.


That would be very framerate dependant.
<<

necros

Posts: 77

Joined: Thu Dec 16, 2004 10:32 pm

Post Mon Jun 06, 2011 10:35 pm

yeah, you'd want something more along the lines of
((endFogTime - currentTime) / fogDuration) * fogAmount to get a proper framerate independant fade.

Return to General Programming

Who is online

Users browsing this forum: Google [Bot] and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.
Icons provided by Aha Soft