sburris0/bevy_flycam has 221 GitHub stars and 69 forks. GitHot measured 0 stars in 24 hours, 0 in 7 days, and 0 in 15 days. Last checked 2026-11-25 08:29 UTC. Last push 2026-07-17.
計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
概要
Basic first-person fly camera for the Bevy game engine
制作・メディアREADME.md
オリジナルbevy_flycam
A basic first-person fly camera for Bevy
Controls
- WASD to move horizontally
- SPACE to ascend
- LSHIFT to descend
- ESC to grab/release cursor.
Comparison
There are a few notable differences from bevy_fly_camera...
- No linear interpolation
- Cursor grabbing
- Shorter code
- Single-line setup
- A tiny bit faster?
Usage
Add to
Cargo.tomlor copylib.rsto your own file[dependencies] bevy = "0.18" bevy_flycam = "*"or
[dependencies] bevy = "0.18" bevy_flycam = { git = "https://github.com/sburris0/bevy_flycam" }Include the prelude:
use bevy_flycam::prelude::*;Add the
PlayerPlugin:#[bevy_main] fn main() { App::new() .add_plugins(DefaultPlugins) .add_plugins(PlayerPlugin) .run(); }
Note that PlayerPlugin will spawn a camera for you. See Using your own camera for details on how to
use a pre-existing one.
Alternatively you can see the example basic.rs or scroll.rs located in the examples folder.
You can run the example by cloning this repository and run the command: cargo run --release --example basic
Customization
Movement and keybindings
To modify player movement speed or mouse sensitivity add it as a resource.
Same thing goes for the keybindings used for moving the camera.
#[bevy_main]
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(PlayerPlugin)
.insert_resource(MovementSettings {
sensitivity: 0.00015, // default: 0.00012
speed: 12.0, // default: 12.0
})
.insert_resource(KeyBindings {
move_ascend: KeyCode::E,
move_descend: KeyCode::Q,
..Default::default()
})
.run();
}
Using your own camera
You can also use NoCameraPlayerPlugin if you want to use your own camera. Be sure to add the FlyCam component to your own camera or else this plugin won't know what to move.
#[bevy_main]
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(NoCameraPlayerPlugin)
.add_systems(Startup, setup)
.run();
}
fn setup(mut commands: Commands) {
commands.spawn((
Camera3d::default(),
Transform::from_xyz(0.0, 2.0, 0.5),
FlyCam
));
}
Support
bevy_flycam's crate version follows bevy's minor version as shown:
| bevy | bevy_flycam |
|---|---|
0.19.0 |
0.19.0 |
0.18.0 |
0.18.0 |
0.17.2 |
0.17.2 |
0.16.1 |
0.16.1 |
0.15.0 |
0.15.0 |
0.14.0 |
0.14.0 |
0.13.0 |
0.13.0 |
0.12.0 |
0.12.0 |
0.11.0 |
0.11.0 |
0.10.1 |
0.10.1 |
Contributing
PRs are very welcome. If you are updating to a new version of Bevy, please also update the README and test the examples.
関連プロジェクトを探す
読み込み中…