Skip to content

deathwatchgaming/Unity-PreviewCameraControl

Repository files navigation

Unity-PreviewCameraControl

Description:

Create a basic ("Preview Camera" / "Fly Cam") by example for your unity asset / project

Preview

Old Input Variant Preview:

Preview

New Input Variant Preview:

Preview

Preview

REPO NOTE: The purpose of this repository / project was decided upon recently when working on another project and creating these scripts for using while working on that project and then coming to the conclusion, hey, this would be helpful for myself and or anyone else that wanted a basic "fly / preview cam" say for usage when creating and or distributing assets like terrain demos or other such assets that do not have say an included character controller or would not need one but would need some type of preview camera to view the demo content in asset or what not, thus upon considering such it was decided to add this repository for such...

NOTE: This project was developed while / for using Unity 2021+ & 2022+ & Unity 6

Preview Camera Controls:

Note: The following found below are related to the provided scripts.

NEW INPUT SYSTEM VARIANT:

NOTE: This currently uses the New Input System, so as such depending on what version of Unity you may be using it may be necessary to make sure such or both is enabled in project settings.

Basic:

  • Forward: W [Keyboard] / Left Stick [Gamepad]
  • Reverse: S [Keyboard] / Left Stick [Gamepad]
  • Left: A [Keyboard] / Left Stick [Gamepad]
  • Right: D [Keyboard] / Left Stick [Gamepad]
  • Up: Q [Keyboard] / D-Pad UP [Gamepad]
  • Down: E [Keyboard] / D-Pad Down [Gamepad]
  • Minus FOV: Z [Keyboard] or Mouse Scroll Wheel / Button North [Gamepad]
  • Plus FOV: X [Keyboard] or Mouse Scroll Wheel / Button West [Gamepad]

Further:

  • Vertical Move Input: Vertical [Keyboard] / Left Stick [Gamepad]
  • Horizontal Move Input: Horizontal [Keyboard] / Left Stick [Gamepad]
  • Mouse Scroll Wheel Input: Mouse ScrollWheel [Mouse]
  • Mouse Y Input: Mouse Y [Mouse] / Right Stick [Gamepad]
  • Mouse X Input: Mouse X [Mouse] / Right Stick [Gamepad]
  • Plus Speed Left Key: Left Shift [Keyboard] / Left Trigger [Gamepad]
  • Plus Speed Right Key: Right Shift [Keyboard] / Right Trigger [Gamepad]
  • Minus Speed Left Key: Left Control [Keyboard] / Left Shoulder [Gamepad]
  • Minus Speed Right Key: Right Control [Keyboard] / Right Shoulder [Gamepad]
  • Plus Lift Key: Q [Keyboard] / D-Pad UP [Gamepad]
  • Minus Lift Key: E [Keyboard] / D-Pad Down [Gamepad]
  • Cursor Lock Key: End [Keyboard] / Select [Gamepad]
  • Minus Field Of View Key: Z [Keyboard] or Mouse Scroll Wheel / Button North [Gamepad]
  • Plus Field Of View Key: X [Keyboard] or Mouse Scroll Wheel / Button West [Gamepad]

OLD INPUT SYSTEM VARIANT:

NOTE: This currently still uses the Old Input System, so as such depending on what version of Unity you may be using it may be necessary to make sure such or both is enabled in project settings.

Basic:

  • Forward: W
  • Reverse: S
  • Left: A
  • Right: D
  • Up: Q
  • Down: E
  • Minus FOV: Z or Mouse Scroll Wheel
  • Plus FOV: X or Mouse Scroll Wheel

Further:

  • Vertical Move Input: Vertical
  • Horizontal Move Input: Horizontal
  • Mouse Scroll Wheel Input: Mouse ScrollWheel
  • Mouse Y Input: Mouse Y
  • Mouse X Input: Mouse X
  • Plus Speed Left Key: Left Shift
  • Plus Speed Right Key: Right Shift
  • Minus Speed Left Key: Left Control
  • Minus Speed Right Key: Right Control
  • Plus Lift Key: Q
  • Minus Lift Key: E
  • Cursor Lock Key: End
  • Minus Field Of View Key: Z
  • Plus Field Of View Key: X

NOTE: This can be used simply as preview cam script only or also provides the option to then opt to also add the preview cam altitude script as well.

Dependencies:

The Preview Camera Altitude Script uses Text Mesh Pro

Manual Setup Instruction:

Simply follow the documentation instruction linkages for manual setups found below.

Old Input Variant:

New Input Variant:

About

Create a basic ("Preview Camera" / "Fly Cam") by example for your Unity asset and or project

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages