A basic first-person fly camera for Bevy 0.4
There are a few notable differences from bevyflycamera...
Cargo.toml
or copy lib.rs
to your own file
toml
[dependencies]
bevy = "0.4"
bevy_flycam = "0.1"
or
toml
[dependencies]
bevy = "0.4"
bevy_flycam = { git = "https://github.com/sburris0/bevy_flycam" }
Include the PlayerPlugin
rust
use bevy_flycam::PlayerPlugin;
Add the PlayerPlugin
:
```rust
fn main() { App::build() .addplugins(DefaultPlugins) .addplugin(PlayerPlugin) .run(); } ```
To modify player movement speed or mouse sensitivity, import bevy_flycam::MovementSettings
and add it as a resource:
```Rust
fn main() { App::build() .addplugins(DefaultPlugins) .addplugin(PlayerPlugin) .add_resources(MovementSettings { sensitivity: 0.00015 // default: 0.00012 speed; 150.0, // default: 12.0 }) .run(); } ```
PRs are very welcome.