Skip to content

Enable glTF coordinate conversion for our examples #20099

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 53 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
c927f3c
Enable glTF coordinate conversion in examples
janhohenheim Jul 12, 2025
4c66c3c
Port anisotropy
janhohenheim Jul 12, 2025
0fc670f
Port anti_aliasing
janhohenheim Jul 12, 2025
f695bef
Port atmosphere
janhohenheim Jul 12, 2025
12dda34
Port atmospheric_fog
janhohenheim Jul 12, 2025
58ff970
Port color_grading
janhohenheim Jul 12, 2025
1c57fa2
Port deferred_rendering
janhohenheim Jul 12, 2025
29d92bf
Convert lights with the camera transform
janhohenheim Jul 12, 2025
38e6eb0
Port depth_of_field
janhohenheim Jul 12, 2025
a37456c
Port edit_material_on_gltf
janhohenheim Jul 12, 2025
ebd0ad5
Fix frame dependent rotation speed while I'm on it
janhohenheim Jul 12, 2025
517d4ff
Port lightmaps
janhohenheim Jul 12, 2025
2629aed
Port load_gltf
janhohenheim Jul 12, 2025
f88701f
Try porting mixed_lighting.rs
janhohenheim Jul 12, 2025
cb7c662
Port post_processing
janhohenheim Jul 12, 2025
6c4cec3
Port solari
janhohenheim Jul 12, 2025
9ba65d7
Fix incorrect description
janhohenheim Jul 12, 2025
c21b0e2
Fix incorrect description
janhohenheim Jul 12, 2025
abe5185
Port tonemapping
janhohenheim Jul 12, 2025
1e805fd
Port update_gltf_scene
janhohenheim Jul 12, 2025
64cf749
Port visibility_range
janhohenheim Jul 12, 2025
672ea00
Port volumetric_fog
janhohenheim Jul 12, 2025
7149b6e
Port animated_mesh
janhohenheim Jul 12, 2025
49bf41d
Port animated_mesh_control
janhohenheim Jul 12, 2025
dbc800f
Port animated_mesh_events
janhohenheim Jul 12, 2025
5729c6d
Port animation_graph
janhohenheim Jul 12, 2025
8b6e59e
Port animation_masks
janhohenheim Jul 12, 2025
ebee145
Replace quat with looking_to
janhohenheim Jul 12, 2025
450633c
Port gltf_skinned_mesh
janhohenheim Jul 12, 2025
8b1ca93
Merge branch 'main' into port-gltf-examples
janhohenheim Jul 12, 2025
c56805a
Port projection_zoom
janhohenheim Jul 12, 2025
70860c0
Port loading_screen
janhohenheim Jul 12, 2025
3be67b5
Port many_foxes
janhohenheim Jul 12, 2025
6441684
Remove outdated comment
janhohenheim Jul 12, 2025
94ec868
Port testbed_3d
janhohenheim Jul 12, 2025
ee03e99
Port scene_viewer
janhohenheim Jul 12, 2025
a5f6d91
Fix formatting
janhohenheim Jul 12, 2025
3e4fc8b
Remove PI
janhohenheim Jul 12, 2025
485e9a4
Keep camera in positive Z
janhohenheim Jul 12, 2025
0aa57c2
Revert light change
janhohenheim Jul 12, 2025
5fdfcf3
Keep camera in positive Z
janhohenheim Jul 12, 2025
8654718
Add comment
janhohenheim Jul 12, 2025
f20c8af
Keep camera in positive Z
janhohenheim Jul 12, 2025
187859f
Keep camera in positive Z
janhohenheim Jul 12, 2025
cad324c
Port irradiance_volumes
janhohenheim Jul 13, 2025
cc58735
Keep camera in positive Z
janhohenheim Jul 13, 2025
82f1ab7
Revert "Keep camera in positive Z"
janhohenheim Jul 13, 2025
7618293
Port reflection_probes
janhohenheim Jul 13, 2025
1daa779
Remove unused PI
janhohenheim Jul 13, 2025
8672a55
Add PR
janhohenheim Jul 13, 2025
244db91
Merge branch 'main' into port-gltf-examples
janhohenheim Jul 13, 2025
c871b2e
Improve description
janhohenheim Jul 13, 2025
bd4965b
Merge branch 'main' into port-gltf-examples
janhohenheim Jul 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,10 @@ bevy_state = { path = "crates/bevy_state", version = "0.17.0-dev", default-featu
bevy_asset = { path = "crates/bevy_asset", version = "0.17.0-dev", default-features = false }
bevy_reflect = { path = "crates/bevy_reflect", version = "0.17.0-dev", default-features = false }
bevy_image = { path = "crates/bevy_image", version = "0.17.0-dev", default-features = false }
# Opt into the new default glTF coordinate conversion that will be the default in 0.18.0
bevy_gltf = { path = "crates/bevy_gltf", version = "0.17.0-dev", default-features = false, features = [
"gltf_convert_coordinates_default",
] }
bevy_gizmos = { path = "crates/bevy_gizmos", version = "0.17.0-dev", default-features = false }
# Needed to poll Task examples
futures-lite = "2.0.1"
Expand Down
4 changes: 2 additions & 2 deletions examples/3d/anisotropy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use bevy::{
};

/// The initial position of the camera.
const CAMERA_INITIAL_POSITION: Vec3 = vec3(-0.4, 0.0, 0.0);
const CAMERA_INITIAL_POSITION: Vec3 = vec3(0.4, 0.0, 0.0);

/// The current settings of the app, as chosen by the user.
#[derive(Resource)]
Expand Down Expand Up @@ -107,7 +107,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>, app_status: Res

commands.spawn((
SceneRoot(asset_server.load("models/AnisotropyBarnLamp/AnisotropyBarnLamp.gltf#Scene0")),
Transform::from_xyz(0.0, 0.07, -0.13),
Transform::from_xyz(0.0, 0.07, 0.13),
Scene::BarnLamp,
));

Expand Down
10 changes: 7 additions & 3 deletions examples/3d/anti_aliasing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,13 @@ fn setup(
}

// Flight Helmet
commands.spawn(SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf"),
)));
commands.spawn((
SceneRoot(
asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf")),
),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
));

// Light
commands.spawn((
Expand Down
2 changes: 1 addition & 1 deletion examples/3d/atmosphere.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fn setup_terrain_scene(
),
Transform::from_xyz(-1.0, 0.0, -0.5)
.with_scale(Vec3::splat(0.5))
.with_rotation(Quat::from_rotation_y(PI / 2.0)),
.with_rotation(Quat::from_rotation_y(-PI / 2.0)),
));
}

Expand Down
9 changes: 6 additions & 3 deletions examples/3d/atmospheric_fog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ fn setup_terrain_scene(
));

// Terrain
commands.spawn(SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/terrain/Mountains.gltf"),
)));
commands.spawn((
SceneRoot(
asset_server.load(GltfAssetLabel::Scene(0).from_asset("models/terrain/Mountains.gltf")),
),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
));

// Sky
commands.spawn((
Expand Down
11 changes: 7 additions & 4 deletions examples/3d/color_grading.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,17 +356,20 @@ fn add_camera(commands: &mut Commands, asset_server: &AssetServer, color_grading

fn add_basic_scene(commands: &mut Commands, asset_server: &AssetServer) {
// Spawn the main scene.
commands.spawn(SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/TonemappingTest/TonemappingTest.gltf"),
)));
commands.spawn((
SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/TonemappingTest/TonemappingTest.gltf"),
)),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
));

// Spawn the flight helmet.
commands.spawn((
SceneRoot(
asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf")),
),
Transform::from_xyz(0.5, 0.0, -0.5).with_rotation(Quat::from_rotation_y(-0.15 * PI)),
Transform::from_xyz(0.5, 0.0, -0.5).with_rotation(Quat::from_rotation_y(-0.15 * PI + PI)),
));

// Spawn the light.
Expand Down
7 changes: 5 additions & 2 deletions examples/3d/deferred_rendering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,13 @@ fn setup(
let helmet_scene = asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf"));

commands.spawn(SceneRoot(helmet_scene.clone()));
commands.spawn((
SceneRoot(helmet_scene.clone()),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
));
commands.spawn((
SceneRoot(helmet_scene),
Transform::from_xyz(-4.0, 0.0, -3.0),
Transform::from_xyz(-4.0, 0.0, -3.0).looking_to(Vec3::Z, Vec3::Y),
));

let mut forward_mat: StandardMaterial = Color::srgb(0.1, 0.2, 0.1).into();
Expand Down
12 changes: 9 additions & 3 deletions examples/3d/depth_of_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,15 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>, app_settings: R
}

// Spawn the scene.
commands.spawn(SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/DepthOfFieldExample/DepthOfFieldExample.glb"),
)));
commands.spawn((
SceneRoot(
asset_server.load(
GltfAssetLabel::Scene(0)
.from_asset("models/DepthOfFieldExample/DepthOfFieldExample.glb"),
),
),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
));

// Spawn the help text.
commands.spawn((
Expand Down
9 changes: 6 additions & 3 deletions examples/3d/edit_material_on_gltf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,20 @@ fn setup_scene(mut commands: Commands, asset_server: Res<AssetServer>) {
let flight_helmet = asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf"));
// This model will keep its original materials
commands.spawn(SceneRoot(flight_helmet.clone()));
commands.spawn((
SceneRoot(flight_helmet.clone()),
Transform::default().looking_to(Vec3::Z, Dir3::Y),
));
// This model will be tinted red
commands.spawn((
SceneRoot(flight_helmet.clone()),
Transform::from_xyz(-1.25, 0., 0.),
Transform::from_xyz(-1.25, 0., 0.).looking_to(Vec3::Z, Dir3::Y),
ColorOverride(palettes::tailwind::RED_300.into()),
));
// This model will be tinted green
commands.spawn((
SceneRoot(flight_helmet),
Transform::from_xyz(1.25, 0., 0.),
Transform::from_xyz(1.25, 0., 0.).looking_to(Vec3::Z, Dir3::Y),
ColorOverride(palettes::tailwind::GREEN_300.into()),
));
}
Expand Down
4 changes: 2 additions & 2 deletions examples/3d/irradiance_volumes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ static CLICK_TO_MOVE_HELP_TEXT: &str = "Left click: Move the object";
static GIZMO_COLOR: Color = Color::Srgba(YELLOW);

static VOXEL_FROM_WORLD: Mat4 = Mat4::from_cols_array_2d(&[
[-42.317566, 0.0, 0.0, 0.0],
[0.0, 0.0, 44.601563, 0.0],
[42.317566, 0.0, 0.0, 0.0],
[0.0, 0.0, -44.601563, 0.0],
[0.0, 16.73776, 0.0, 0.0],
[0.0, 6.544792, 0.0, 1.0],
]);
Expand Down
8 changes: 4 additions & 4 deletions examples/3d/light_textures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use widgets::{
#[path = "../helpers/widgets.rs"]
mod widgets;

/// The speed at which the cube rotates, in radians per frame.
const CUBE_ROTATION_SPEED: f32 = 0.02;
/// The speed at which the cube rotates, in radians per second.
const CUBE_ROTATION_SPEED: f32 = FRAC_PI_2;

/// The speed at which the selection can be moved, in spherical coordinate
/// radians per mouse unit.
Expand Down Expand Up @@ -381,9 +381,9 @@ fn draw_gizmos(mut gizmos: Gizmos, spotlight: Query<(&GlobalTransform, &SpotLigh
}

/// Rotates the cube a bit every frame.
fn rotate_cube(mut meshes: Query<&mut Transform, With<Rotate>>) {
fn rotate_cube(mut meshes: Query<&mut Transform, With<Rotate>>, time: Res<Time>) {
for mut transform in &mut meshes {
transform.rotate_y(CUBE_ROTATION_SPEED);
transform.rotate_y(CUBE_ROTATION_SPEED * time.delta_secs());
}
}

Expand Down
10 changes: 7 additions & 3 deletions examples/3d/lightmaps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ fn main() {
}

fn setup(mut commands: Commands, asset_server: Res<AssetServer>, args: Res<Args>) {
commands.spawn(SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/CornellBox/CornellBox.glb"),
)));
commands.spawn((
SceneRoot(
asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/CornellBox/CornellBox.glb")),
),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
));

let mut camera = commands.spawn((
Camera3d::default(),
Expand Down
11 changes: 8 additions & 3 deletions examples/3d/load_gltf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
}
.build(),
));
commands.spawn(SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf"),
)));
commands.spawn((
SceneRoot(
asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf")),
),
// Rotate the scene to face the camera.
Transform::default().looking_to(Vec3::Z, Vec3::Y),
));
}

fn animate_light_direction(
Expand Down
2 changes: 1 addition & 1 deletion examples/3d/meshlet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fn setup(
MeshMaterial3d(debug_material.clone()),
Transform::default()
.with_scale(Vec3::splat(0.2))
.with_rotation(Quat::from_rotation_y(PI))
.looking_to(Vec3::Z, Vec3::Y)
.with_translation(Vec3::new(x as f32 / 2.0, 0.0, 0.3)),
));
}
Expand Down
2 changes: 1 addition & 1 deletion examples/3d/mixed_lighting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>, app_status: Res
fn spawn_camera(commands: &mut Commands) {
commands
.spawn(Camera3d::default())
.insert(Transform::from_xyz(-0.7, 0.7, 1.0).looking_at(vec3(0.0, 0.3, 0.0), Vec3::Y));
.insert(Transform::from_xyz(0.7, 0.7, -1.0).looking_at(vec3(0.0, 0.3, 0.0), Vec3::Y));
}

/// Spawns the scene.
Expand Down
11 changes: 7 additions & 4 deletions examples/3d/post_processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,20 @@ fn spawn_camera(commands: &mut Commands, asset_server: &AssetServer) {
/// variety of colors.
fn spawn_scene(commands: &mut Commands, asset_server: &AssetServer) {
// Spawn the main scene.
commands.spawn(SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/TonemappingTest/TonemappingTest.gltf"),
)));
commands.spawn((
SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/TonemappingTest/TonemappingTest.gltf"),
)),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
));

// Spawn the flight helmet.
commands.spawn((
SceneRoot(
asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf")),
),
Transform::from_xyz(0.5, 0.0, -0.5).with_rotation(Quat::from_rotation_y(-0.15 * PI)),
Transform::from_xyz(0.5, 0.0, -0.5).with_rotation(Quat::from_rotation_y(-0.15 * PI + PI)),
));

// Spawn the light.
Expand Down
4 changes: 3 additions & 1 deletion examples/3d/reflection_probes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ fn spawn_reflection_probe(commands: &mut Commands, cubemaps: &Cubemaps) {
diffuse_map: cubemaps.diffuse.clone(),
specular_map: cubemaps.specular_reflection_probe.clone(),
intensity: 5000.0,
rotation: Quat::from_rotation_y(PI),
..default()
},
// 2.0 because the sphere's radius is 1.0 and we want to fully enclose it.
Expand Down Expand Up @@ -175,7 +176,7 @@ fn add_environment_map_to_camera(
.insert(Skybox {
image: cubemaps.skybox.clone(),
brightness: 5000.0,
..default()
rotation: Quat::from_rotation_y(PI),
});
}
}
Expand Down Expand Up @@ -285,6 +286,7 @@ fn create_camera_environment_map_light(cubemaps: &Cubemaps) -> EnvironmentMapLig
diffuse_map: cubemaps.diffuse.clone(),
specular_map: cubemaps.specular_environment_map.clone(),
intensity: 5000.0,
rotation: Quat::from_rotation_y(PI),
..default()
}
}
Expand Down
10 changes: 7 additions & 3 deletions examples/3d/solari.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,13 @@ fn main() {

fn setup(mut commands: Commands, asset_server: Res<AssetServer>, args: Res<Args>) {
commands
.spawn(SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/CornellBox/CornellBox.glb"),
)))
.spawn((
SceneRoot(
asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/CornellBox/CornellBox.glb")),
),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
))
.observe(add_raytracing_meshes_on_scene_load);

commands.spawn((
Expand Down
2 changes: 1 addition & 1 deletion examples/3d/ssr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const CAMERA_ZOOM_RANGE: Range<f32> = 2.0..12.0;
static TURN_SSR_OFF_HELP_TEXT: &str = "Press Space to turn screen-space reflections off";
static TURN_SSR_ON_HELP_TEXT: &str = "Press Space to turn screen-space reflections on";
static MOVE_CAMERA_HELP_TEXT: &str =
"Press WASD or use the mouse wheel to pan and orbit the camera";
"Press WASD to orbit and use the mouse wheel to zoom the camera";
static SWITCH_TO_FLIGHT_HELMET_HELP_TEXT: &str = "Press Enter to switch to the flight helmet model";
static SWITCH_TO_CUBE_HELP_TEXT: &str = "Press Enter to switch to the cube model";

Expand Down
3 changes: 2 additions & 1 deletion examples/3d/tonemapping.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ fn setup_basic_scene(mut commands: Commands, asset_server: Res<AssetServer>) {
SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/TonemappingTest/TonemappingTest.gltf"),
)),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
SceneNumber(1),
));

Expand All @@ -110,7 +111,7 @@ fn setup_basic_scene(mut commands: Commands, asset_server: Res<AssetServer>) {
asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf")),
),
Transform::from_xyz(0.5, 0.0, -0.5).with_rotation(Quat::from_rotation_y(-0.15 * PI)),
Transform::from_xyz(0.5, 0.0, -0.5).with_rotation(Quat::from_rotation_y(-0.15 * PI + PI)),
SceneNumber(1),
));

Expand Down
3 changes: 2 additions & 1 deletion examples/3d/update_gltf_scene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {

// Spawn the scene as a child of this entity at the given transform
commands.spawn((
Transform::from_xyz(-1.0, 0.0, 0.0),
Transform::from_xyz(-1.0, 0.0, 0.0).looking_to(Vec3::Z, Vec3::Y),
SceneRoot(
asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf")),
Expand All @@ -45,6 +45,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {

// Spawn a second scene, and add a tag component to be able to target it later
commands.spawn((
Transform::default().looking_to(Vec3::Z, Vec3::Y),
SceneRoot(
asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf")),
Expand Down
2 changes: 2 additions & 0 deletions examples/3d/visibility_range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ fn setup(
asset_server
.load(GltfAssetLabel::Scene(0).from_asset("models/FlightHelmet/FlightHelmet.gltf")),
),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
MainModel::HighPoly,
));

Expand All @@ -124,6 +125,7 @@ fn setup(
.from_asset("models/FlightHelmetLowPoly/FlightHelmetLowPoly.gltf"),
),
),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
MainModel::LowPoly,
));

Expand Down
12 changes: 9 additions & 3 deletions examples/3d/volumetric_fog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,15 @@ fn main() {
/// Initializes the scene.
fn setup(mut commands: Commands, asset_server: Res<AssetServer>, app_settings: Res<AppSettings>) {
// Spawn the glTF scene.
commands.spawn(SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("models/VolumetricFogExample/VolumetricFogExample.glb"),
)));
commands.spawn((
SceneRoot(
asset_server.load(
GltfAssetLabel::Scene(0)
.from_asset("models/VolumetricFogExample/VolumetricFogExample.glb"),
),
),
Transform::default().looking_to(Vec3::Z, Vec3::Y),
));

// Spawn the camera.
commands
Expand Down
Loading
Loading