You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is also fixed by adding .with_children(|_| {}) to the scene_holder, because then the parent_update_system can simply insert to the existing children which works without delay.
The repro can be fixed by using commands.entity(parent).push_children(&[child]) instead of .insert(Parent(parent)).
jakobhellermann
changed the title
Transform not propagated for child if parent had no Children
Transform not propagated for child due to delay of inserting ChildrenApr 3, 2021
alice-i-cecile
added
C-Bug
An unexpected or incorrect behavior
A-UI
Graphical user interfaces, styles, layouts, and widgets
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
and removed
C-Usability
A targeted quality-of-life change that makes Bevy easier to use
labels
Apr 3, 2021
In the following code snippet, the
1.5
scale is not applied to the scene:The
transform_propagate_system
only runs if either the parent isChanged
or the child isChanged
.However, in this case the order of operations is
0v0
is spawned (and isChanged
for one frame)0v3
isChanged
for one frame.A
Parent(0v0)
component is scheduled to be added via commands.parent_update_system
is run, but theinsert Children
command is not yet processedtransform_propagate_system
is run.0v3
is stillChanged
, but since0v0
has no children yet nothing happens.0v0
now hasChildren([0v3])
.parent_update_system
is run, nothing to be donetransform_propagate_system
is run. This time there are children for0v0
, but0v3
is not changed anymore, so nothing happens.The problem is "fixed" by either adding a
or removing the
Changed
from transform_propagate_system.It is also fixed by adding
.with_children(|_| {})
to thescene_holder
, because then theparent_update_system
can simply insert to the existing children which works without delay.A simpler repro is here.
The text was updated successfully, but these errors were encountered: