Bevy 0.16 upgrade (#24)

This commit is contained in:
extrawurst
2025-04-29 00:14:25 +02:00
committed by GitHub
parent b4bfa53df4
commit 11568d57ed
40 changed files with 932 additions and 699 deletions

View File

@@ -22,8 +22,10 @@ pub fn plugin(app: &mut App) {
//
// NOTE: The collision implementation here is very basic and a bit buggy.
// A collide-and-slide algorithm would likely work better.
PostProcessCollisions,
kinematic_controller_collisions.run_if(in_state(GameState::Playing)), // todo check if we can make this less viral,
PhysicsSchedule,
kinematic_controller_collisions
.in_set(NarrowPhaseSet::Last)
.run_if(in_state(GameState::Playing)),
);
}
@@ -122,6 +124,7 @@ pub struct CharacterControllerBundle {
ground_caster: ShapeCaster,
gravity: ControllerGravity,
movement: MovementBundle,
collision_events: CollisionEventsEnabled,
}
/// A bundle that contains components for character movement.
@@ -169,6 +172,7 @@ impl CharacterControllerBundle {
.with_max_distance(0.2),
gravity: ControllerGravity(gravity),
movement: MovementBundle::default(),
collision_events: CollisionEventsEnabled,
}
}
}