I have a TextBundle
as a Children
of an Entity
with a SpriteBundle
.
I want to change the transform of both of these in a query, I tried something like this:
<code>mut query: Query<(Entity, &Creature, &mut Transform)>
mut child_query: Query<&Children>
</code>
<code>mut query: Query<(Entity, &Creature, &mut Transform)>
mut child_query: Query<&Children>
</code>
mut query: Query<(Entity, &Creature, &mut Transform)>
mut child_query: Query<&Children>
I can then get the child entity with:
<code>for (entity, creature, mut transform) in query.iter_mut() {
// edit transform of creature
for child in child_query.iter_descendants(entity) {
// How can i get the transform component of this child entity?
}
}
</code>
<code>for (entity, creature, mut transform) in query.iter_mut() {
// edit transform of creature
for child in child_query.iter_descendants(entity) {
// How can i get the transform component of this child entity?
}
}
</code>
for (entity, creature, mut transform) in query.iter_mut() {
// edit transform of creature
for child in child_query.iter_descendants(entity) {
// How can i get the transform component of this child entity?
}
}
How can I edit the transform component of this child entity?