From 46cc8567c80fd9d5d171fa6c8fbae4dfbba18bc7 Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Fri, 20 Oct 2023 20:36:04 +0100 Subject: [PATCH] Move camera closer to model in morph_targets example. --- examples/morph_targets.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/morph_targets.rs b/examples/morph_targets.rs index 325e798..8636492 100644 --- a/examples/morph_targets.rs +++ b/examples/morph_targets.rs @@ -60,7 +60,7 @@ fn setup(asset_server: Res, mut commands: Commands) { ..default() }); commands.spawn(Camera3dBundle { - transform: Transform::from_xyz(3.0, 2.1, 10.2).looking_at(Vec3::ZERO, Vec3::Y), + transform: Transform::from_xyz(3.0, 2.1, 5.2).looking_at(Vec3::ZERO, Vec3::Y), ..default() }); } @@ -117,8 +117,12 @@ fn name_morphs( return; } - let Some(mesh) = meshes.get(&morph_data.mesh) else { return }; - let Some(names) = mesh.morph_target_names() else { return }; + let Some(mesh) = meshes.get(&morph_data.mesh) else { + return; + }; + let Some(names) = mesh.morph_target_names() else { + return; + }; for name in names { println!(" {name}"); }