pub struct ControlsCommand {
pub mouse_sensitivity: Option<f32>,
pub fov_y_degrees: Option<f32>,
pub gamepad_look_sensitivity: Option<f32>,
pub gamepad_deadzone: Option<f32>,
pub gamepad_map: Option<GamepadMap>,
}Expand description
Runtime-only event sent by GraphicsSystem when a live camera setting changes,
read by Camera3DSystem from its Events<ControlsCommand> queue.
These settings (mouse sensitivity, field of view) take effect on the camera, not the renderer, so a change made in the settings menu is handed across as this event rather than read from disk each frame: the camera updates its live value on the same tick. Each field is an Option so one event can carry only the value that changed (None leaves the rest untouched). World authors never declare this type directly.
Fields§
§mouse_sensitivity: Option<f32>New mouse-look sensitivity, in radians per pixel. None leaves it unchanged. Applied live by the camera controller.
fov_y_degrees: Option<f32>New camera vertical field of view, in degrees. None leaves it unchanged. Applied live to every Camera3D by the camera controller.
gamepad_look_sensitivity: Option<f32>New gamepad look sensitivity, in radians per second at full stick deflection. None leaves it unchanged. Applied live by the camera controller.
gamepad_deadzone: Option<f32>New gamepad stick deadzone as a deflection fraction in [0, 1]. None leaves it unchanged. Applied live by the input sampling.
gamepad_map: Option<GamepadMap>New gamepad action -> button map after a rebind. None leaves it unchanged. Applied live by the input sampling.
Trait Implementations§
Source§impl Clone for ControlsCommand
impl Clone for ControlsCommand
Source§fn clone(&self) -> ControlsCommand
fn clone(&self) -> ControlsCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more