Skip to content

Commit f1e613e

Browse files
committed
Free camera feature
1 parent 0202fd9 commit f1e613e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/3d/atmosphere.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
//! This example showcases pbr atmospheric scattering
2-
#[path = "../helpers/camera_controller.rs"]
3-
mod camera_controller;
4-
5-
use camera_controller::{CameraController, CameraControllerPlugin};
2+
#[cfg(feature = "free_camera")]
3+
use bevy::camera_controller::free_camera::{FreeCamera, FreeCameraPlugin};
64
use std::f32::consts::PI;
75

86
use bevy::{
@@ -42,7 +40,8 @@ fn main() {
4240
.insert_resource(GameState::default())
4341
.add_plugins((
4442
DefaultPlugins,
45-
CameraControllerPlugin,
43+
#[cfg(feature = "free_camera")]
44+
FreeCameraPlugin,
4645
LogDiagnosticsPlugin::default(),
4746
))
4847
.add_plugins(MaterialPlugin::<ExtendedMaterial<StandardMaterial, Water>>::default())
@@ -120,7 +119,8 @@ fn setup_camera_fog(mut commands: Commands) {
120119
Bloom::NATURAL,
121120
// Enables the atmosphere to drive reflections and ambient lighting (IBL) for this view
122121
AtmosphereEnvironmentMapLight::default(),
123-
CameraController::default(),
122+
#[cfg(feature = "free_camera")]
123+
FreeCamera::default(),
124124
VolumetricFog::default(),
125125
Msaa::Off,
126126
Fxaa::default(),

0 commit comments

Comments
 (0)