Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lint: modifying camera code under FixedUpdate schedule #105

Open
BD103 opened this issue Sep 24, 2024 · 3 comments
Open

Add lint: modifying camera code under FixedUpdate schedule #105

BD103 opened this issue Sep 24, 2024 · 3 comments
Labels
A-Linter Related to the linter and custom lints C-Feature Make something new possible

Comments

@BD103
Copy link
Member

BD103 commented Sep 24, 2024

See #99 for more details.

@BD103 BD103 added A-Linter Related to the linter and custom lints C-Feature Make something new possible labels Sep 24, 2024
@janhohenheim
Copy link
Member

Note that the correct schedule for camera update code is the last variable timestep before the fixed schedule for things that influence the physics, usually rotation, and Update for things that react to the physics, e.g. following the player.

Somewhat confusingly, the last variable update before the fixed schedules is not PreUpdate, but a specific ordering inside RunFixedMainLoop. See the fixed timestep example in the Bevy repo.

As for how to detect camera code: is it too X-Controversial to just look at the name of the involved components and see if they contain the word Camera?

@alice-i-cecile
Copy link
Member

Yeah just look for Camera in the components IMO.

@BD103
Copy link
Member Author

BD103 commented Sep 24, 2024

As for how to detect camera code: is it too X-Controversial to just look at the name of the involved components and see if they contain the word Camera?

I'm punting it to Nursery, if that's the approach we choose. There's a lot of opportunity for false positives, and I wouldn't be comfortable stabilizing it without testing in the wild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Related to the linter and custom lints C-Feature Make something new possible
Projects
Status: Todo
Development

No branches or pull requests

3 participants