forked from bevyengine/bevy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve first person camera in example (bevyengine#15109)
# Objective - I've seen quite a few people on discord copy-paste the camera code of the first-person example and then run into problems with the pitch. - ~~Additionally, the code is framerate-dependent.~~ it's not, see comment in PR ## Solution - Make the code good enough to be copy-pasteable - ~~Use `dt` to make the code framerate-independent~~ Add comment explaining why we don't use `dt` - Clamp the pitch - Move the camera sensitivity into a component for better configurability ## Testing Didn't run the example again, but the code is straight from another project I have open, so I'm not worried. --------- Co-authored-by: Antony <antony.m.3012@gmail.com>
- Loading branch information
1 parent
afbbbd7
commit 4de67b5
Showing
1 changed file
with
48 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters