Rust Wiki

Debug Camera

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.

w a s d - Position the camera

mouse - Adjust the pitch and yaw of the camera (i.e. look around)

q - Raise camera height

e - Lower camera height

space - Slows down the movement speed of the camera by half when held down.

right arrow - Roll / rotate camera right or clockwise

left arrow - Roll / rotate camera left or anti-clockwise

right mouse + mouse left / mouse right - Adjust roll / rotation of camera on the fly

up arrow / down arrow - Adjust pitch of the camera angle (i.e. aim up or down)

Field of View

z or + - Zoom in (increase FOV amount)

c or - - Zoom out (decrease FOV amount)

right mouse + mouse up / mouse down - Adjust zoom (FOV amount) on the fly

FOV Command

You can also use the command debugcamera_fov <value> to set the zoom/FOV to a particular value.

Reset Camera

Use the r 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 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> - 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.

You can also use the command debugcamera_savetofile <name> to save the camera state as a .cam text file, which is stored in a folder called "camsaves" in the game's root directory.

Load a camera save point or .cam file by using the command debugcamera_load <name>

Camera save points can be called on any level, server or demo file. 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.

The total number of saved camera points is printed at the bottom of the list. A separate section labelled 'files' is listed for all .cam files stored in the "camsaves" directory.

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 also currently causes the debug camera to track the movement origin of the player.

Camera Parenting

Use the command bind <key> +debugcamera_targetbind to bind a key of your choosing to toggle camera parenting.

When using debug camera, press your key bind to parent the camera to an entity being looked at. Press the same key to un-parent the camera from the entity and return to normal free-cam.

Orbit Controls

Once parented, move the mouse to easily orbit the camera around the entity and targeted bone.

up arrow / down arrow keys will orbit around the pitch axis of the targeted entity.

mouse scroll wheel will track the camera in/out from the targeted entity (i.e. move the camera closer or further away)

ctrl + left arrow / right arrow keys will orbit around the yaw axis of the targeted entity.

left arrow / right arrow keys will roll / rotate the camera as normal.

The speed of the orbit can be specified using the camlookspeed command. Additionally, the camera lerping commands will also affect the smoothness of the orbit's movement speed.

Here's an example of the debug camera orbiting around a parented player and tracking in/out.

Parent Offset

You can offset the position of the parented camera by using the basic camera transform controls, which can be particuarly useful if you still want to target an entity but re-position the camera's origin.

Use ⇧ shift + r to reset the offset transform and return the debug camera to it's original orbit position.

Bone Targeting

By default when parenting to an entity the camera will target the root bone of the nominated entity.

Use the tab key to cycle between different bones on the entity. The console will print out the name of the newly targeted bone which the debug camera is parented to.

Use the command cambone <bonename> to manually parent the debug camera to a particular bone.

Running the command cambone without a specified bone name will return the name of the current target bone.

Bone Rotation

debugcamera_bonerotation <0/1> - Applies the target bone's rotation to the debug camera. Default value is 0.

Here's an example of the debug camera targeting the head bone of a Horse with bone rotation enabled.

Camera Guides

Use the command debugcamera_guide <0-4> to enable different types of camera guide overlays. These are useful for helping frame particular compositions in your videos and images when using the debug camera.

Default value is 0 which disables the guide overlay. You can also assign a custom color to the guide overlay.

Rule of thirds

Use debugcamera_guide 1 to enable a rule of thirds guide for the debug camera.

debugcamera_guide_1.jpg

Golden Ratio

Use debugcamera_guide 2 to enable a golden ratio fibonacci guide for the debug camera.

debugcamera_guide_2.jpg

Aspect Ratio

Use debugcamera_guide 3 to enable an aspect ratio guide for the debug camera.

Set a custom aspect ratio by using debugcamera_guide_aspectratio <value> - for example 1 1 will be a square ratio. The aspect ratio being applied is printed in the top-left corner of the guide.

debugcamera_guide_3.jpg

Crosshair

Use debugcamera_guide 4 to enable a crosshair guide for the debug camera.

debugcamera_guide_4.jpg

Guide Color

Use debugcamera_guide_color <value> to set the color of the above guides.

The value parameter is measured in RGBA values.

Page Links


Special Pages


Wikis

?

Render Time: 17ms

DB GetPage 3
Generate Html 0
SaveChanges (1) 9
Render Body 0
Render Sidebar 0