Skip to content

'2D Viewport To World' example doesn't follow API docs recommendation #19416

Open
@AccessViolation95

Description

@AccessViolation95

How can Bevy's documentation be improved?

https://bevyengine.org/examples/2d-rendering/2d-viewport-to-world/

This example adds an input handling system like so: .add_systems(FixedUpdate, controls).
It uses the FixedUpdate schedule for this. However, the documentation for the Update schedule suggests that it should be used for input handling functions instead. Furthermore, the FixedUpdate documentation links to Update for "examples of systems that should not use this schedule," so this might cause some confusion.

I'm assuming the API documentation is correct but I don't know whether the example is. I suggest one of these changes:

  • If the example's choice of schedule for this system is indeed the preferred option, it should explain why it chooses to deviate from the recommended usage of the schedules per the API docs in a code comment.
  • If the example's choice of schedule for this system is incorrect or inconsequential, it should follow the recommendations of the API docs for consistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-InputPlayer input via keyboard, mouse, gamepad, and moreA-TimeInvolves time keeping and reportingC-DocsAn addition or correction to our documentationC-ExamplesAn addition or correction to our examplesS-Needs-DesignThis issue requires design work to think about how it would best be accomplishedX-UncontroversialThis work is generally agreed upon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions