Path: blob/main/crates/bevy_camera_controller/src/lib.rs
7228 views
//! A home for first-party camera controllers for Bevy,1//! used for moving the camera around your scene.2//!3//! This crate serves two key purposes:4//!5//! 1. It provides functional camera controllers to help users quickly get started.6//! 2. It holds the camera controllers used by Bevy's own examples and tooling.7//!8//! While these camera controllers are customizable,9//! there is a limit to the customization options available.10//! If you find your project requires different behavior,11//! do not hesitate to copy-paste the camera controller code12//! into your own project and modify it as needed.13//!14//! Each of the provided controllers is gated behind a feature flag,15//! so you don't have to pay for unused camera controllers.16//! These features are all off by default; to enable them,17//! you need to specify the desired features in your Cargo.toml file.18//!19//! For example, to enable the `free_camera` camera controller,20//! you would add the following to your Cargo.toml:21//!22//! ```toml23//! [dependencies]24//! bevy = { version = "0.X", features = ["free_camera"] }25//! ```26//!27//! Once the correct feature is enabled,28//! add the camera controller plugin to your Bevy app.29//! If your camera is for debugging and development purposes,30//! consider adding a feature flag (e.g. `dev-mode`) or a run condition on31//! the systems in the plugin, which can check a configuration resource.32//!33//! For a full overview of the available camera controllers,34//! please check out the modules of this crate.35//! Each camera controller is stored in its own module,36//! and gated behind a feature flag of the same name.3738#![warn(missing_docs)]3940#[cfg(feature = "free_camera")]41pub mod free_camera;4243#[cfg(feature = "pan_camera")]44pub mod pan_camera;454647