
Bevy Character Movement
Bevy 0.20 kinematic character movement: intent components, FixedUpdate integration...
Install
npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-character-movement -g -a claude-code -y- Repository
- thedivergentai/Game-Dev-Agentic-Skills917
- Category
- Engineering
- Updated
- 19d ago
- License
- LGPL-3.0
- Context cost
- Mediumabout 2,466 tokens
- Runs scripts
- No, instructions only
What it does
Bevy 0.20 kinematic character movement: intent components, FixedUpdate integration, coyote time, and jump buffer. Use when a player or actor walks or jumps and the step must stay stable. Keywords: Bevy, movement, FixedUpdate, coyote, jump buffer, ECS.
Bevy character movement
When to use
Load this when a Bevy app needs a player or actor that moves in discrete steps (walk, jump feel, ground check) and you need the ECS shape before any solver code exists. Coyote time and a jump buffer are design notes. They are not a node port.
ECS shape
- Components own pose and intent: position, velocity, and a jump-buffer or coyote timer as data. The Quick Start ECS page shows components as Rust structs that derive
Component. - Resources own clocks and tuning shared by every mover.
bevy::time0.20.0 documentsTime,Fixed(fixed timestep clock), andVirtual. - Systems read intent and write velocity or position. Register them on the fixed schedule, not on a per-node physics callback.
- Schedule:
run_fixed_main_schedulerunsFixedMainfrom virtual time (bevy::time0.20.0). Order dependent systems with.chain()(ECS page). Do not paste a Godot physics-process function.
Engine counterparts
| Godot idea | Bevy idiom |
|---|---|
| Body that you move yourself | Entity with movement components and a system |
| Step that should stay stable when frame time changes | System on the fixed timestep (Fixed / FixedMain) |
| Coyote time, jump buffer | Timer data on the entity or a small resource, consumed by the movement system |
| Collision response | Collision response belongs on bevy-physics-3d. |
Scope
Locomotion here is kinematic data on FixedUpdate: intent, velocity, coyote time, and a jump buffer. Collision response belongs on bevy-physics-3d. Do not call move_and_slide, _physics_process, or CharacterBody2D.
[dependencies]
bevy = "0.20"
#[derive(Component, Default)]
struct PlanarIntent {
axis: Vec2,
jump_pressed: bool,
}
#[derive(Component)]
struct KinematicBody {
velocity: Vec3,
grounded: bool,
coyote: f32,
jump_buffer: f32,
}
