[−][src]Crate bevy_fly_camera
A simple plugin and component for a basic flying camera in Bevy. Movement system is based on Minecraft, flying along the horizontal plane no matter the mouse's vertical angle, with two extra buttons for moving vertically.
Defalt keybinds are:
- W / A / S / D - Move along the horizontal plane
- Shift - Move downward
- Space - Move upward
Example
use bevy::prelude::*; use bevy_fly_camera::{FlyCamera, FlyCameraPlugin}; fn setup(mut commands: Commands) { commands .spawn(Camera3dComponents::default()) .with(FlyCamera::default()); } fn main() { App::build() .add_default_plugins() .add_startup_system(setup.system()) .add_plugin(FlyCameraPlugin) .run(); }
There's also a basic piece of example code included in /examples/basic.rs
Structs
FlyCamera | A set of options for initializing a FlyCamera.
Attach this component to a |
FlyCameraPlugin | Include this plugin to add the systems for the FlyCamera bundle. |