fn ray_cast(mut runs: Local<'_, i32>, physics_world: PhysicsWorld<'_>) {
            // Skip the first run to give time for the world to setup
            if *runs == 0 {
                *runs = *runs + 1;
                return;
            }

            // Cast a ray downward to try and miss the block we spawned with setup_ray_cast_test_app()
            let result = physics_world.ray_cast(Vec3::default(), Vec3::new(0., -200., 0.), true);

            // Make sure we don't hit anything
            assert!(result.is_none());
        }
/// The system to test ray casting
The system to test ray casting
The system to test ray casting
fn ray_cast(mut runs: Local<'_, i32>, physics_world: PhysicsWorld<'_>) {
            // Skip the first run to give time for the world to setup
            if *runs == 0 {
                *runs = *runs + 1;
                return;
            }
            // Cast a ray downward to try and miss the block we spawned with setup_ray_cast_test_app()
            let result = physics_world.ray_cast(Vec3::default(), Vec3::new(0., -200., 0.), true);
            // Make sure we don't hit anything
            assert!(result.is_none());
        }
fn ray_cast ( mut runs : Local < ' _ , i32 > , physics_world : PhysicsWorld < ' _ > ) { // Skip the first run to give time for the world to setup if * runs == 0 { * runs = * runs + 1 ; return ; } // Cast a ray downward to try and miss the block we spawned with setup_ray_cast_test_app() let result = physics_world . ray_cast ( Vec3 :: default ( ) , Vec3 :: new ( 0. , - 200. , 0. ) , true ) ; // Make sure we don't hit anything assert ! ( result is_none ( ) ) ; }
The system to test ray casting
The system to test ray casting
runs
Local<'_, i32>
physics_world
PhysicsWorld<'_>
runs
Local<'_, i32>
physics_world
PhysicsWorld<'_>