Move camera closer to model in morph_targets example.

This commit is contained in:
Robin KAY 2023-10-20 20:36:04 +01:00
parent 1636b9fd28
commit 46cc8567c8
1 changed files with 7 additions and 3 deletions

View File

@ -60,7 +60,7 @@ fn setup(asset_server: Res<AssetServer>, mut commands: Commands) {
..default() ..default()
}); });
commands.spawn(Camera3dBundle { 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() ..default()
}); });
} }
@ -117,8 +117,12 @@ fn name_morphs(
return; return;
} }
let Some(mesh) = meshes.get(&morph_data.mesh) else { return }; let Some(mesh) = meshes.get(&morph_data.mesh) else {
let Some(names) = mesh.morph_target_names() else { return }; return;
};
let Some(names) = mesh.morph_target_names() else {
return;
};
for name in names { for name in names {
println!(" {name}"); println!(" {name}");
} }