Crate bevy_fpc

Source
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

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 bevy Plugin trait. This plugin require the bevy_rapier3d plugin.
FpcSprintConfiguration
A resource for specifying configuration information about bevy_fpc sprinting feature.
KeyboardLinearInputs
Structure for the keyboard linear inputs configuration
Player
Marker used for embodying the associated first person controller.
SprintRate
Component used to mutate speed of controller horizontal translations when sprinting. Contain one value by which the WalkSpeed will be multiplied.
WalkSpeed
Component used to mutate speed of controller horizontal translations when walking. Contain one value by which the linear velocity will be multiplied.

Enums§

AngularState
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)