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 moreimpl Copy for ControlsCommand
Source§impl Debug for ControlsCommand
impl Debug for ControlsCommand
Source§impl Default for ControlsCommand
impl Default for ControlsCommand
Source§fn default() -> ControlsCommand
fn default() -> ControlsCommand
Source§impl PartialEq for ControlsCommand
impl PartialEq for ControlsCommand
impl StructuralPartialEq for ControlsCommand
Auto Trait Implementations§
impl Freeze for ControlsCommand
impl RefUnwindSafe for ControlsCommand
impl Send for ControlsCommand
impl Sync for ControlsCommand
impl Unpin for ControlsCommand
impl UnsafeUnpin for ControlsCommand
impl UnwindSafe for ControlsCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().