-
How do you apply components such as transform to a scene? There doesn't seem to be a way to do it directly and spawning it as a child like the following example: let scene_handle = ass.load::<Scene, &str>("models/tile.glb#Scene0");
commands.spawn_scene(scene_handle.clone());
let mut entity = commands.spawn();
entity
.borrow_mut()
.insert(Transform::from_xyz(0.0, -1.0, 0.0))
.insert(Spawning);
scene_spawner.spawn_as_child(scene_handle, entity.id()); doesn't work. It doesn't seem like to be parented when it comes to movement etc. What is the correct way to move around a scene and/or the meshes inside it? |
Beta Was this translation helpful? Give feedback.
Answered by
wilk10
Oct 27, 2021
Replies: 1 comment
-
See how it's done in the update_gltf_scene example. It's a bit convoluted indeed, but basically you need to also mark the entities from the scene, not only the parent, and then you can change the components of those entities. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
alice-i-cecile
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See how it's done in the update_gltf_scene example.
It's a bit convoluted indeed, but basically you need to also mark the entities from the scene, not only the parent, and then you can change the components of those entities.