pub struct CameraConfig {Show 17 fields
pub min_pitch: f32,
pub max_pitch: f32,
pub low_distance: f32,
pub high_distance: f32,
pub min_distance: f32,
pub min_zoom: f32,
pub max_zoom: f32,
pub zoom_step: f32,
pub focus_height: f32,
pub focus_strength: f32,
pub distance_strength: f32,
pub clip_start: f32,
pub clip_margin: f32,
pub default_pitch: f32,
pub field_of_view: f32,
pub near_plane: f32,
pub far_plane: f32,
}Expand description
Tunable parameters of an OrbitCamera.
CameraConfig::default matches a Zelda-style action-adventure camera. Each
field can be overridden for a different feel.
Fields§
§min_pitch: f32Lowest pitch in radians (looking up the most). Negative looks up.
max_pitch: f32Highest pitch in radians (looking down the most).
low_distance: f32Orbit distance at min_pitch.
high_distance: f32Orbit distance at max_pitch.
min_distance: f32Distance the camera never clips below.
min_zoom: f32Smallest zoom multiplier.
max_zoom: f32Largest zoom multiplier.
zoom_step: f32Multiplicative zoom step applied per unit of OrbitCamera::zoom input.
focus_height: f32Height of the focus point above the followed target.
focus_strength: f32Smoothing strength of the focus point. Larger follows faster.
distance_strength: f32Smoothing strength of the orbit distance. Larger reaches the goal faster.
clip_start: f32Distance below which clipping is skipped.
clip_margin: f32Gap kept between the camera and clipped geometry.
default_pitch: f32Initial pitch of a freshly created camera.
field_of_view: f32Vertical field of view in radians.
near_plane: f32Near clip plane.
far_plane: f32Far clip plane.
Trait Implementations§
Source§impl Clone for CameraConfig
impl Clone for CameraConfig
Source§fn clone(&self) -> CameraConfig
fn clone(&self) -> CameraConfig
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 CameraConfig
Source§impl Debug for CameraConfig
impl Debug for CameraConfig
Source§impl Default for CameraConfig
impl Default for CameraConfig
Source§impl PartialEq for CameraConfig
impl PartialEq for CameraConfig
Source§fn eq(&self, other: &CameraConfig) -> bool
fn eq(&self, other: &CameraConfig) -> bool
self and other values to be equal, and is used by ==.