bevy
bevy copied to clipboard
Add support for skybox transformation
Objective
- Fixes https://github.com/bevyengine/bevy/issues/14036
Solution
- Add a view space transformation for the skybox
Testing
- I have tested the newly added
transform
field using theskybox
example.
diff --git a/examples/3d/skybox.rs b/examples/3d/skybox.rs
index beaf5b268..d16cbe988 100644
--- a/examples/3d/skybox.rs
+++ b/examples/3d/skybox.rs
@@ -81,6 +81,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
Skybox {
image: skybox_handle.clone(),
brightness: 1000.0,
+ rotation: Quat::from_rotation_x(PI * -0.5),
},
));
Migration Guide
- Since we have added a new filed to the Skybox struct, users will need to include
..Default::default()
or some rotation value in their initialization code.