Bevy 0.16 upgrade (#24)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user