Skip to content

GlobalTransform not being updated #3329

@yilinwei

Description

@yilinwei

Bevy version

ffecb05

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.

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-TransformTranslations, rotations and scalesC-BugAn unexpected or incorrect behaviorC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions