/// Processes input received from any keyboard-like input system. Accepts input parameter in the form of camera defined ENUM (to abstract it from windowing systems)
Processes input received from any keyboard-like input system. Accepts input parameter in the form of camera defined ENUM (to abstract it from windowing systems)
Processes input received from any keyboard - like input system . Accepts input parameter in the form of camera defined ENUM ( to abstract it from windowing systems )
pub fn process_keyboard(&mut self, direction: Camera_Movement, delta_time: f32) {
        let velocity = self.movement_speed * delta_time;
        if direction == FORWARD {
            self.position += self.front * velocity;
        }
        if direction == BACKWARD {
            self.position += -(self.front * velocity);
        }
        if direction == LEFT {
            self.position += -(self.right * velocity);
        }
        if direction == RIGHT {
            self.position += self.right * velocity;
        }
    }
pub fn process_keyboard ( & mut self , direction : Camera_Movement , delta_time : f32 ) { let velocity = self . movement_speed * delta_time ; if direction == FORWARD { self . position += self . front * velocity ; } if direction == BACKWARD { self . position += - ( self . front * velocity ) ; } if direction == LEFT { self . position += - ( self . right * velocity ) ; } if direction == RIGHT { self . position += self . right * velocity ; } }
Processes input received from any keyboard-like input system.
Processes input received from any keyboard - like input system .
&mut self
direction
Camera_Movement
delta_time
f32