@@ 77,9 77,19 @@ fn main() {
info!("goodbye");
}
+#[derive(Component)]
+struct PlayerCamera;
+
fn setup(mut commands: Commands) {
- let camera_bundle = Camera3dBundle::default();
- commands.spawn(camera_bundle);
+ commands.spawn(Camera3dBundle {
+ transform: Transform {
+ translation: Vec3::new(0.0, -1.5, 8.0),
+ rotation: Quat::from_rotation_x(0.2),
+ ..Default::default()
+ },
+ ..Default::default()
+ })
+ .insert(PlayerCamera);
}
fn editor_controls() -> bevy_editor_pls::controls::EditorControls {