Skip to content

Generate warnings when incorrectly accessing Transform or GlobalTransform #1439

Closed as not planned
@aevyrie

Description

@aevyrie

What problem does this solve or what need does it fill?

Updating Transform late or reading GlobalTransform early are very common issues that result in a number of help requests and bugs in general.

What solution would you like?

Generate a warning in debug mode any time a Transform is ever mutated after GlobalTransform is propagated or a GlobalTransform is accessed before it has been updated that frame.

What alternative(s) have you considered?

  1. Do nothing, accept this as a source of error.
  2. Develop some general method of specifying component dependencies.
  3. Keep positions from the last frame in GlobalTransform and propagate Transforms at the end of the frame to ensure that worst case, systems accessing it will be a frame out of date, but still work. This could be accompanied with an error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with Bevy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions