A spectator camera plugin for the Bevy game engine.
Action | Key |
---|---|
Forward | W |
Left | A |
Backward | S |
Right | D |
Up | Space |
Down | LControl |
Alt. Speed | LShift |
Release Cursor | Escape |
Movement is constrained to the appropriate axes. (WASD
to X & Z axes, Space
& LShift
to the Y axis)
use bevy::prelude::*;
use bevy_spectator::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(SpectatorPlugin)
.add_startup_system(setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn((
Camera3dBundle::default(), Spectator
));
}
bevy_spectator is dual-licensed under MIT/Apache-2.0. Feel free to use it under either.