-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Bevy version
Operating system & version
Linux
What you did
Link to repo here.
The only file is src/main.rs. The bevy submodule is simply to add some extra logging.
What you expected to happen
The TransformPlugin has two systems parent_update and transform_propagate. parent_update is always meant to run before transform_propagate according to the run criteria.
If an Entity has a Parent but no Children, parent_update creates one. The transform_propagate then queries from the root nodes and updates the GlobalTransform.
Whether you insert a Children component shouldn't matter. The Children should be inserted by the parent_update and the transform_propagate should pick up the inserted Children.
What actually happened
Whether you insert the Children does matter, if you comment the line out you get the unexpected matrix: log line, whereas otherwise you don't.
Adding some more println! statements, the root node query doesn't pick up Children at all - it's empty, but you can clearly see the new Children in the later query and adding the println! directly where the Children is added shows that it does hit that part of the code.