bevy/examples/camera
Jan Hohenheim 4de67b5cdb
Improve first person camera in example (#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>
2024-09-10 03:53:32 +00:00
..
2d_top_down_camera.rs Rename rendering components for improved consistency and clarity (#15035) 2024-09-10 01:11:46 +00:00
first_person_view_model.rs Improve first person camera in example (#15109) 2024-09-10 03:53:32 +00:00
projection_zoom.rs Add examples for orthographic and perspective zoom (#15092) 2024-09-09 23:30:52 +00:00