use std::f32::consts::PI; use bevy::{prelude::*, DefaultPlugins}; use crate::terrain::TerrainPlugin; mod terrain; fn main() { println!("here"); App::new() .add_plugins((DefaultPlugins, TerrainPlugin)) .add_systems(Startup, setup_scene) .add_systems(Update, move_camera) .run(); println!("here2"); } fn setup_scene(mut commands: Commands) { commands.spawn(Camera3dBundle { transform: Transform::from_xyz(-10., 3., -10.).looking_at(Vec3::ZERO, Vec3::Y), ..default() }); commands.spawn(DirectionalLightBundle { directional_light: DirectionalLight { shadows_enabled: true, ..default() }, transform: Transform { translation: Vec3::new(0.0, 2.0, 0.0), rotation: Quat::from_rotation_x(-PI / 4.), ..default() }, ..default() }); } fn move_camera( mut camera_q: Query<&mut Transform, With>, keycodes: Res>, time: Res