Keep camera in positive Z

This commit is contained in:
Jan Hohenheim 2025-07-13 01:03:17 +02:00
parent 8654718523
commit f20c8afd3d
No known key found for this signature in database

View File

@ -40,13 +40,17 @@ 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(),
Transform::from_xyz(278.0, 273.0, -800.0).looking_to(Vec3::Z, Vec3::Y),
Transform::from_xyz(-278.0, 273.0, 800.0),
));
if args.deferred {