bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Add support for skybox transformation

Open Soulghost opened this issue 7 months ago • 2 comments

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 the skybox 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),
         },
     ));
image

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.

Soulghost avatar Jul 10 '24 15:07 Soulghost