Author Topic: shakeCamera function?  (Read 630 times)

shakeCamera = true;
camShakeFreq = "2.0 2.0 2.0";
camShakeAmp = "1.0 1.0 1.0";
camShakeDuration = 0.5;
camShakeRadius = 10.0;

What's the function for this, or how can I go about using it with a schedule?
For example, I've noticed in many weapons that when you fire, it shakes the camera.

That's because when you fire the weapon, a function in the gun's script causes the person firing the weapon to spawn an invisible projectile that instantly explodes, where the explosion is set to shake the firer's camera. The explosion has such a tiny explosion radius that only the firer can feel it.

How could I implement that into a schedule, whereas what you stated happens every 500ms as long as the player is holding down the right-mouse button?

you could spawn explosions on their player?