Skip to content

Camera Smoothing

Matt Haynie edited this page Dec 24, 2017 · 3 revisions

To help explain how the linear/bezier combination curve works, check out https://www.desmos.com/calculator/wwa8063njx.

ConVars

  • ce_smoothing_enabled: (0) Enables or disables the smoothing system.
  • ce_smoothing_fov: (45) Switching to targets outside of this FOV will be disabled. This poorly named value is half of the actual fov, meaning that setting it to 180 will allow smoothing to any targets, and setting it to 90 will allow smoothing to any targets that are to the side or in front of the player.
  • ce_smoothing_max_distance: (2250) Smoothing will skip targets greater than this many hammer units away.
  • ce_smoothing_force_distance: (128) Always smooth to targets within this many hammer units.
  • ce_smoothing_linear_speed: (875) Speed in hammer units per second at which the linear part of the smoothing curve operates. This will also be the maximum speed of the bezier part of the curve.
  • ce_smoothing_duration: (0.65) Percentage of the smoothing curve that is dedicated to the bezier part.
  • ce_smoothing_ang_bias: (0.85) "Bias" for the angle smoothing.
  • ce_smoothing_mode: (1) Different modes for smoothing to targets.
    • 0 : Clamp distance to target. This means that players can't "run away" from the camera if they move suddenly (like if a demo or soldier rocket jumps). Essentially, does the smooth in "player space".
    • 1 : Lerp between start position and target. Allows players to "run away" from the camera, but may appear to be smoother, especially if you're trying to catch up to a scout who's furiously mashing his spacebar. Essentially, does the smooth in world space.
  • ce_smoothing_check_los: (1) Makes sure we have line of sight to the player we're smoothing to (try not to go through walls). However, this code can't predict the future. If a player moves behind a wall after a smooth has started, we're already committed to completing the smooth, walls be damned.
  • ce_smoothing_los_buffer: (32) Expands the LOS check as a 3x3x3 cube of points by this many hammer units. For example, if this is 32, the cube will be from -16 HU to +16 HU in all dimensions. If more than ce_smoothing_los_min percent of points pass the LOS check, enable smoothing to this target.
  • ce_smoothing_los_min: (0, [0, 1]) Minimum percentage of points that must pass the LOS check to allow smoothing to a given target.
  • ce_smoothing_debug_los: (0) Draws points associated with LOS checking for camera smooths.
  • ce_smoothing_debug: (0) Prints debugging info about camera smooths to the console.
  • ce_smoothing_avoid_scoped_snipers
Clone this wiki locally