From d22dad06de93c4cacee9908feaef955dc050552f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Mockers?= Date: Fri, 1 Jan 2021 19:33:48 +0100 Subject: [PATCH] update example on GLTF to use names --- examples/3d/load_gltf.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/examples/3d/load_gltf.rs b/examples/3d/load_gltf.rs index ccd1e98a49d58..99eacf6b15078 100644 --- a/examples/3d/load_gltf.rs +++ b/examples/3d/load_gltf.rs @@ -5,6 +5,7 @@ fn main() { .add_resource(Msaa { samples: 4 }) .add_plugins(DefaultPlugins) .add_startup_system(setup.system()) + .add_system(display_only_parts.system()) .run(); } @@ -21,3 +22,36 @@ fn setup(commands: &mut Commands, asset_server: Res) { ..Default::default() }); } + +// When pressing spacebar, it will display only part of the model, rotating between the parts +fn display_only_parts( + mut enabled: Local, + keyboard_input: Res>, + time: Res