Skip to content
Viewing as a member
crates · rust · bevy

Character controller forbevy_player

A kinematic character controller for Bevy 0.20 built on Avian3D physics — gravity, jumping, collision-aware movement, direction mapping, and fall-damage events behind a single PlayerPlugin.

A working character out of the box

A single PlayerPlugin, configured with a PlayerConfig, handles gravity, jumping, collision-aware movement, input-to-direction mapping, and fall-damage events.

RustBevy crate
Avian3DPhysics
Bevy 0.20Engine
MITLicense

What it gives you

Features

Avian3D physics

Per-axis shape-cast sweeps give collision-aware movement that slides along walls.

Configurable tuning

PlayerConfig sets collider size, speed, gravity, jump velocity, and fall-damage tuning, and round-trips through serde.

ECS components

Player and PlayerPhysics mark and drive the controller.

Direction mapping

DirectionMap maps WASD to world directions — isometric diagonals by default, or top_down cardinals.

Fall damage

FallDamageEvent fires on hard landings for the game to react.

Spawn helper

spawn_player_entity() spawns a fully configured player.

Get started

Usage

main.rs
use bevy::prelude::*;
use bevy_player::{PlayerPlugin, PlayerConfig};

App::new()
    .add_plugins(PlayerPlugin::new(PlayerConfig::default()))
    .run();

Questions

Frequently asked

What does the bevy_player crate do?

It is a kinematic character controller for Bevy 0.20 built on Avian3D physics, providing gravity, jumping, collision-aware movement with wall-sliding, and fall damage.

How do I configure movement speed and jump?

Pass a PlayerConfig to PlayerPlugin::new — it tunes collider size, speed, gravity, jump velocity, and fall-damage thresholds, and spawn_player_entity spawns a fully configured player.

How is fall damage handled?

The controller emits a FallDamageEvent on hard landings so the game can apply damage or feedback in its own systems.

Discuss on the forum

Questions, fixes and notes on this page live in the KBVE forum.