SetPOVShake


SetPOVShake() changes the angle and position of the internal camera and then resets them. LEC used this in their weapon cogs to simulate kickback. Syntax:

SetPOVShake(pos_offset, angle_offset, pos_reset_speed, angle_reset_speed);

pos_offset: This is an offset vector that moves the pov camera the specified amount away from the original camera position. Offset vectors like this one are usually written in this form: 'x y z'.

angle_offset: This offset vector changes the pitch, yaw, and roll of the view. It is usually written as 'p y r', but you can use a vector variable instead.

pos_reset_speed: This is the speed with which the camera returns to it's original position.

angle_reset_speed: This is the speed with which the camera returns to it's original angle.

Here's how SetPOVShake() is used in weap_bryar.cog:

SetPOVShake('0.0 -.003 0.0', '1.0 0.0 0.0', .05, 80.0);


SetPOVShake() is used to reset the position and angle of the internal camera. If the reset speeds are zero, the camera's position and angle will not be reset. This can be very useful if you want to change the view of the internal camera. The downside is that you cannot see external-only models (like the player) and the internal weapon model will stay with the camera.