[][src]Crate bevy_fly_camera

A simple plugin and bundle 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(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

The FlyCamera bundle. Spawn this to instantiate a flying camera.

FlyCameraOptions

A set of options for initializing a FlyCamera.

FlyCameraPlugin

Include this plugin to add the systems for the FlyCamera bundle.