Revision Difference
Debug_Camera#523667
<cat>Dev.Cinematic</cat>
<title>Debug Camera</title>
<upload src="739b0/8d7b02f4995fbbb.jpg" size="238322" name="rust-wiki_debug_header.jpg" />
# Getting Started
Debug camera is a freecam view which can be used by server administrators and developers.
## Enabling Debug Camera
Use the command `debugcamera` to toggle between the debug camera and player camera. By default the camera will be positioned inside the head of the player triggering the command.
The command is best used when bound to a key - eg. `bind p debugcamera`
# Transform Controls
The controls for the debug camera are fairly straightforward and mostly mimic existing movement keys.
<key>W A S D</key> - Position the camera
<key>MOUSE</key> - Adjust the pitch and yaw of the camera (i.e. look around)
<key>Q</key> - Raise camera height
<key>E</key> - Lower camera height
<key>Space</key> - Slows down the [movement speed](/rust/Debug_Camera#cameraspeed) of the camera by half when held down.
<key>Right Arrow</key> - Roll / rotate camera right or clockwise
<key>Left Arrow</key> - Roll / rotate camera left or anti-clockwise
<key>RIGHT MOUSE</key> + <key>MOUSE LEFT</key> / <key>MOUSE RIGHT</key> - Adjust roll / rotation of camera on the fly
# Field of View
<key>Z</key> or <key>+</key> - Zoom in (increase FOV amount)
<key>C</key> or <key>-</key> - Zoom out (decrease FOV amount)
<key>RIGHT MOUSE</key> + <key>MOUSE UP</key> / <key>MOUSE DOWN</key> - Adjust zoom (FOV amount) on the fly
# Reset Camera
Use the <key>R</key> key to reset the field of view and roll of the debug camera to it's default state.
# Speed Controls
Below are the available commands for controlling speed properties of the debug camera.
## Camera Speed
`camspeed <amount>` - Sets the movement speed of the camera. Default value is `1`.
## Look Speed
`camlookspeed <amount>` - Sets the look speed of the camera. Default value is `1`.
An amount of `0` will lock the camera angle and prevent mouse movement to aim the camera.
## Zoom Speed
`camzoomspeed <amount>` - Sets the zoom speed of the camera when using [FOV](/rust/Debug_Camera#fieldofview) controls. Default value is `1`.
# Lerping
These commands are useful for adding smoothed movement to certain properties of the debug camera.
## Camera Lerp
`camlerp <amount>` - Adds lerping (smoothing) to the debug camera's movement. Default value is `1`.
⤶
Lower values such as `0.01` will provide smoother results to movement of the camera.
`camlerp <amount>` - Add lerping (smoothing) to the debug camera's movement. Default value is `1`. Lower values such as `0.01` will provide smoother results to movement of the camera.
⤶
`camlerptilt <0/1>` - Enable/disable tilt and roll locomotion for lower lerp values.
## Zoom Lerp
`camzoomlerp <amount>` - Adds lerping to the camera's zoom movement. Default value is `1`
Useful for adding smoother movement to FOV adjustments. Lower values = smoother motion.
# Save Points
Use the command `debugcamera_save <name>` to save the position, angle, fov and roll of the camera.
Load a camera save point by using the command `debugcamera_load <name>`
**Note:** Camera save points are stored locally and can be called on any level or [demo file](/rust/Demos). Saving a camera point with the same name will overwrite the previous save state with no warning.
## Auto Save
`debugcamera_autosave <0/1>` - Automatically save the debug camera state when toggling it
This will save / retain the position, angle, fov and roll of the camera.
## Auto Load
`debugcamera_autoload <0/1>` - Automatically load the debug camera state when toggling it
## Preserve
`debugcamera_preserve <0/1>` - Preserve the initial debug camera state through game restarts
## List Save Points
`debugcamera_list` - Prints out all of the saved camera points; including name, position, rotation and zoom.
⤶
<note>This command is currently being developed and yet to be released.</note>⤶
⤶
The total number of saved camera points is also printed at the bottom of the list.⤶
## Clear Saves
Use the command `debugcamera_clear` to remove all camera save points.
# Camera Unfreeze
Use the command `debugcamera_unfreeze` to unfreeze player controls whilst remaining in the debug camera view.
This currently causes the camera to track the player and resets zoom + roll properties to their default state.