Rust Wiki

Revision Difference

Debug_Camera#524961

<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 <key>UP Arrow</key> / <key>Down Arrow</key> - Adjust pitch aof the camera angle (i.e. aim up or down) # 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 ## FOV Command You can also use the command `debugcamera_fov <value>` to set the zoom/FOV to a particular value. # 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>` - 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. 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 also currently causes the debug camera to track the movement origin of the player. # Camera Parenting Use the <key>F</key> key in debug camera mode to parent the camera to the entity being looked at. Press the same key to un-parent and return to normal free roam debug camera. ## Orbit Controls Once parented, move the <key>MOUSE</key> to easily orbit the camera around the entity and [targeted bone.](/rust/Debug_Camera#bonetargeting) <key>UP Arrow</key> / <key>Down Arrow</key> keys will orbit around the pitch axis of the targeted entity. <key>MOUSE SCROLL WHEEL</key> will track the camera in/out from the targeted entity (i.e. move the camera closer or further away) <key>CTRL</key> + <key>Left Arrow</key> / <key>Right Arrow</key> keys will orbit around the yaw axis of the targeted entity. <key>Left Arrow</key> / <key>Right Arrow</key> keys will roll / rotate the camera as normal. The speed of the orbit can be specified using the [camlookspeed command](/rust/Debug_Camera#lookspeed). Additionally, the [camera lerping](/rust/Debug_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. <upload src="739b0/8d7bffa9fffefdd.mp4" size="16612722" name="debugcamera_parenting_orbit.mp4" /> ## Parent Offset You can offset the position of the parented camera by using the basic [camera transform controls](rust/Debug_Camera#transformcontrols), which can be particuarly useful if you still want to target an entity but re-position the camera's origin. Use <key>Shift</key> + <key>R</key> 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 <key>TAB</key> 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. <upload src="739b0/8d7bff9268094c7.mp4" size="4719405" name="cambone_head_horse.mp4" /> # 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 dsiables the guide overlay. Default value is `0` which dsiables the guide overlay. You can also assign a [custom color](/rust/Debug_Camera#guidecolor) to the guide overlay. ## Rule of thirds Use `debugcamera_guide 1` to enable a rule of thirds guide for the debug camera. <upload src="739b0/8d7c00150950331.jpg" size="804886" name="debugcamera_guide_1.jpg" /> ## Golden Ratio Use `debugcamera_guide 2` to enable a golden ratio fibonacci guide for the debug camera. <upload src="739b0/8d7c001934a9a39.jpg" size="873177" name="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. <upload src="739b0/8d7c0020713e7e2.jpg" size="459242" name="debugcamera_guide_3.jpg" /> ## Crosshair Use `debugcamera_guide 4` to enable a crosshair guide for the debug camera. <upload src="739b0/8d7c0022bb7abdb.jpg" size="490565" name="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.