[−][src]Struct bevy_fly_camera::FlyCamera
A set of options for initializing a FlyCamera.
Attach this component to a Camera3dComponents
bundle to control it with your mouse and keyboard.
Example
fn setup(mut commands: Commands) { commands .spawn(Camera3dComponents::default()) .with(FlyCamera::default()); }
Fields
speed: f32
The speed the FlyCamera moves at. Defaults to 1.0
max_speed: f32
The maximum speed the FlyCamera can move at. Defaults to 0.5
sensitivity: f32
The sensitivity of the FlyCamera's motion based on mouse movement. Defaults to 3.0
friction: f32
The amount of deceleration to apply to the camera's motion. Defaults to 1.0
pitch: f32
The current pitch of the FlyCamera in degrees. This value is always up-to-date, enforced by FlyCameraPlugin
yaw: f32
The current pitch of the FlyCamera in degrees. This value is always up-to-date, enforced by FlyCameraPlugin
velocity: Vec3
The current velocity of the FlyCamera. This value is always up-to-date, enforced by FlyCameraPlugin
key_forward: KeyCode
Key used to move forward. Defaults to W
key_backward: KeyCode
Key used to move backward. Defaults to `S
key_left: KeyCode
Key used to move left. Defaults to A
key_right: KeyCode
Key used to move right. Defaults to D
key_up: KeyCode
Key used to move up. Defaults to Space
key_down: KeyCode
Key used to move forward. Defaults to LShift
enabled: bool
If false
, disable keyboard control of the camera. Defaults to true
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for FlyCamera
impl Send for FlyCamera
impl Sync for FlyCamera
impl Unpin for FlyCamera
impl UnwindSafe for FlyCamera
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Component for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T> FromResources for T where
T: Default,
T: Default,
pub fn from_resources(_resources: &Resources) -> T
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Resource for T where
T: 'static + Send + Sync,
T: 'static + Send + Sync,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,