Resize camera projection on window resize

This commit is contained in:
Jarrod Doyle 2023-10-20 12:12:46 +01:00
parent afb4e2d8d8
commit 6e2762eb5c
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 5 additions and 0 deletions

View File

@ -144,6 +144,11 @@ impl CameraController {
pub fn process_events(&mut self, event: &WindowEvent) -> bool { pub fn process_events(&mut self, event: &WindowEvent) -> bool {
match event { match event {
WindowEvent::Resized(physical_size) => {
self.projection
.resize(physical_size.width, physical_size.height);
true
}
WindowEvent::KeyboardInput { WindowEvent::KeyboardInput {
input: input:
KeyboardInput { KeyboardInput {