Skip to content

Commit 42f0b50

Browse files
committed
Fix pccm example
1 parent b23c18c commit 42f0b50

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/3d/pccm.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use core::f32;
55
use bevy::{
66
camera::Hdr,
77
camera_controller::free_camera::{FreeCamera, FreeCameraPlugin},
8-
light::NoParallaxCorrection,
8+
light::ParallaxCorrection,
99
prelude::*,
1010
};
1111

@@ -180,17 +180,17 @@ fn handle_pccm_enable_change(
180180
// selected.
181181
app_status.pccm_enabled = **message;
182182

183-
// Add or remove the `NoParallaxCorrection` component as appropriate.
183+
// Add the appropriate variant of the `ParallaxCorrection` component.
184184
match **message {
185185
PccmEnableStatus::Enabled => {
186186
commands
187187
.entity(light_probe_entity)
188-
.remove::<NoParallaxCorrection>();
188+
.insert(ParallaxCorrection::Auto);
189189
}
190190
PccmEnableStatus::Disabled => {
191191
commands
192192
.entity(light_probe_entity)
193-
.insert(NoParallaxCorrection);
193+
.insert(ParallaxCorrection::None);
194194
}
195195
}
196196
}

0 commit comments

Comments
 (0)