pub struct FirstPersonConfig {Show 14 fields
pub walk_speed: f32,
pub sprint_speed: f32,
pub response: f32,
pub jump_speed: f32,
pub gravity: f32,
pub max_fall_speed: f32,
pub mouse_sensitivity: f32,
pub keyboard_turn_speed: f32,
pub min_pitch: f32,
pub max_pitch: f32,
pub eye_offset: Vec3,
pub vertical_fov: f32,
pub coyote_time: f32,
pub jump_buffer_time: f32,
}Expand description
Validated once when creating/reconfiguring a controller. Positive Y is up.
Fields§
§walk_speed: f32Walking speed, world units/second.
sprint_speed: f32Sprinting speed, world units/second.
response: f32Exponential horizontal response rate, per second. Zero selects immediate motion.
jump_speed: f32Initial jump velocity, world units/second.
gravity: f32Positive downward acceleration, world units/second squared.
max_fall_speed: f32Positive maximum falling speed, world units/second.
mouse_sensitivity: f32Radians per logical-window pointer unit, independent of viewport/DPI scaling.
keyboard_turn_speed: f32Keyboard yaw speed, radians/second.
min_pitch: f32Minimum pitch in radians, strictly above -PI/2.
max_pitch: f32Maximum pitch in radians, strictly below PI/2.
eye_offset: Vec3World-space eye offset relative to body center.
vertical_fov: f32Vertical field of view in degrees, strictly between 0 and 180.
coyote_time: f32Seconds after leaving ground in which jumping remains possible; zero disables grace.
jump_buffer_time: f32Seconds to retain a jump edge before landing; zero requires an immediate jump.
Implementations§
Source§impl FirstPersonConfig
impl FirstPersonConfig
Sourcepub fn validate(&self) -> Result<(), FirstPersonError>
pub fn validate(&self) -> Result<(), FirstPersonError>
Rejects nonfinite values, negative rates and camera limits crossing the poles.