//! This example demonstrates bounding volume intersections. use bevy::{math::bounding::*, prelude::*}; fn main() { App::new() .add_plugins(DefaultPlugins) .init_state::() .add_systems(Startup, setup) .add_systems( Update, (update_text, spin, update_volumes, update_test_state), ) .add_systems( PostUpdate, ( render_shapes, ( aabb_intersection_system.run_if(in_state(Test::AabbSweep)), circle_intersection_system.run_if(in_state(Test::CircleSweep)), ray_cast_system.run_if(in_state(Test::RayCast)), aabb_cast_system.run_if(in_state(Test::AabbCast)), bounding_circle_cast_system.run_if(in_state(Test::CircleCast)), ), render_volumes, ) .chain(), ) .run(); } #[derive(Component)] struct Spin; fn spin(time: Res