pub struct WalkInput {
pub wish: DVec3,
pub jump: bool,
}Expand description
Per-frame input to CharacterBody::walk.
Fields§
§wish: DVec3Wish direction, world space. In MoveMode::Walk only x/y
steer; the fly modes use all three components. Length is
clamped to 1, so passing a raw WASD sum is fine — scale it
down for analog part-speed input.
jump: boolJump this frame. Fires when grounded or within the coyote
window; otherwise it stays buffered for
CharacterDef::jump_buffer seconds and fires on landing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WalkInput
impl RefUnwindSafe for WalkInput
impl Send for WalkInput
impl Sync for WalkInput
impl Unpin for WalkInput
impl UnsafeUnpin for WalkInput
impl UnwindSafe for WalkInput
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 more