Expand description
First-person-controller plugin for the Bevy game-engine.
The controller benefits from the features offered by the rapier character controller
.
Plugins initialization:
// Require the `bevy_rapier3d` crate
App::new()
.add_plugins(RapierPhysicsPlugin::<NoUserData>::default())
.add_plugins(FpcPlugin);
Spawn and embody an fpc
entity:
commands.spawn(FpcBundle::default()).insert(Player);
Custom configuration:
app.insert_resource(FpcConfiguration{
keyboard_linear_inputs: LINEAR_AZERTY_LAYOUT,
..Default::default()
});
§Features
bevy_fpc
main crate / APIbevy_fpc_core
add minimal features to the controller (walking and looking)bevy_fpc_sprint
(default) add sprinting capability to the controller
Structs§
- Fpc
- Fpc marker
- FpcBundle
- Bundle containing all neccessary components for the base of a first person controller entity.
- FpcConfiguration
- A resource for specifying configuration information about first person controllers.
- FpcPlugin
- The
bevy_fpc
structure implementing the bevyPlugin
trait. This plugin require thebevy_rapier3d
plugin. - FpcSprint
Configuration - A resource for specifying configuration information about
bevy_fpc
sprinting feature. - Keyboard
Linear Inputs - Structure for the keyboard linear inputs configuration
- Player
- Marker used for embodying the associated first person controller.
- Sprint
Rate - Component used to mutate speed of controller horizontal translations when sprinting.
Contain one value by which the
WalkSpeed
will be multiplied. - Walk
Speed - Component used to mutate speed of controller horizontal translations when walking. Contain one value by which the linear velocity will be multiplied.
Enums§
- Angular
State - State used to eithers contains the mouse cursor while allowing angular movements or let the mouse cursor free while preventing angular movements.
Constants§
- LINEAR_
AZERTY_ LAYOUT - Linear movement inputs for a
azerty
keyboard layout (ZQSD) - LINEAR_
QWERTY_ LAYOUT - Linear movement inputs for a
qwerty
keyboard layout (WASD)