Page 1 of 1

Screen shake when shooting

Posted: Sun Apr 10, 2011 7:24 pm
by JasonX
Where can i change the value?

Posted: Sun Apr 10, 2011 9:53 pm
by leileilol
self.punchangle_x

Posted: Mon Apr 11, 2011 1:59 am
by JasonX
By using this on, let's say, "i get hit", can i have the same effect?

Posted: Mon May 02, 2011 7:39 am
by lth
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).

Posted: Mon May 02, 2011 8:58 pm
by blubswillrule
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.

Posted: Mon May 02, 2011 10:20 pm
by metlslime
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.

Posted: Mon Jun 06, 2011 10:35 pm
by necros
yeah, you'd want something more along the lines of
((endFogTime - currentTime) / fogDuration) * fogAmount to get a proper framerate independant fade.