pub struct FirstPersonSettings<T = f32> {
pub move_forward_button: Button,
pub move_backward_button: Button,
pub strafe_left_button: Button,
pub strafe_right_button: Button,
pub fly_up_button: Button,
pub fly_down_button: Button,
pub move_faster_button: Button,
pub speed_horizontal: T,
pub speed_vertical: T,
pub mouse_sensitivity_horizontal: T,
pub mouse_sensitivity_vertical: T,
}Expand description
First person camera settings.
Fields§
Which button to press to move forward.
Which button to press to move backward.
Which button to press to strafe left.
Which button to press to strafe right.
Which button to press to fly up.
Which button to press to fly down.
Which button to press to move faster.
speed_horizontal: TThe horizontal movement speed.
This is measured in units per second.
speed_vertical: TThe vertical movement speed.
This is measured in units per second.
mouse_sensitivity_horizontal: TThe horizontal mouse sensitivity.
This is a multiplier applied to horizontal mouse movements.
mouse_sensitivity_vertical: TThe vertical mouse sensitivity.
This is a multiplier applied to vertical mouse movements.
Implementations§
Source§impl<T> FirstPersonSettings<T>where
T: Float,
impl<T> FirstPersonSettings<T>where
T: Float,
Sourcepub fn keyboard_wasd() -> FirstPersonSettings<T>
pub fn keyboard_wasd() -> FirstPersonSettings<T>
Creates new first person camera settings with wasd defaults.
Sourcepub fn keyboard_esdf() -> FirstPersonSettings<T>
pub fn keyboard_esdf() -> FirstPersonSettings<T>
Creates a new first person camera settings with esdf defaults.
Sourcepub fn keyboard_zqsd() -> FirstPersonSettings<T>
pub fn keyboard_zqsd() -> FirstPersonSettings<T>
Creates new first person camera settings with zqsd defaults (azerty keyboard layout).