mutzing about with a fps renderer. I am satisfied with this imgui thing I have going on. But it's a bit bone headed to have these two components so tightly coupled
This commit is contained in:
@@ -5,7 +5,8 @@ use cgmath::{Decomposed, InnerSpace, Matrix4, Point3, Rad, Vector3};
|
||||
use winit_24::dpi::{LogicalPosition, PhysicalPosition};
|
||||
use winit_24::event::{ElementState, MouseScrollDelta, VirtualKeyCode};
|
||||
use crate::render::OPENGL_TO_WGPU_MATRIX;
|
||||
|
||||
use imgui::Condition;
|
||||
use imgui::*;
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub struct Camera {
|
||||
@@ -150,6 +151,7 @@ impl CameraController {
|
||||
}
|
||||
|
||||
pub fn update_camera(&mut self, camera: &mut Camera, dt: f32) {
|
||||
|
||||
// Move forward/backward and left/right
|
||||
let view_vector = Vector3::new(
|
||||
(1.0 * camera.pitch.0.sin() * camera.yaw.0.sin()),
|
||||
|
||||
Reference in New Issue
Block a user