pub struct DefaultInputApplicator {
pub move_speed: Fix128,
pub jump_impulse: Fix128,
}Expand description
Default input applicator: movement → velocity, action bit 0 → jump.
Fields§
§move_speed: Fix128Movement speed multiplier
jump_impulse: Fix128Jump impulse magnitude
Trait Implementations§
Source§impl Default for DefaultInputApplicator
impl Default for DefaultInputApplicator
Source§impl InputApplicator for DefaultInputApplicator
impl InputApplicator for DefaultInputApplicator
Source§fn apply(
&self,
world: &mut PhysicsWorld,
_player_id: u8,
body_index: usize,
input: &FrameInput,
_dt: Fix128,
)
fn apply( &self, world: &mut PhysicsWorld, _player_id: u8, body_index: usize, input: &FrameInput, _dt: Fix128, )
Apply a player’s input to their controlled body.
Auto Trait Implementations§
impl Freeze for DefaultInputApplicator
impl RefUnwindSafe for DefaultInputApplicator
impl Send for DefaultInputApplicator
impl Sync for DefaultInputApplicator
impl Unpin for DefaultInputApplicator
impl UnsafeUnpin for DefaultInputApplicator
impl UnwindSafe for DefaultInputApplicator
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> 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