pub struct TnuaBuiltinDash {
pub displacement: Vector3,
pub desired_forward: Option<Dir3>,
pub allow_in_air: bool,
pub speed: Float,
pub brake_to_speed: Float,
pub acceleration: Float,
pub brake_acceleration: Float,
pub input_buffer_time: Float,
}
Expand description
The basic dash action.
Fields§
§displacement: Vector3
The direction and distance of the dash.
This input parameter is cached when the action starts. This means that the control system does not have to make sure the direction reamins the same even if the player changes it mid-dash.
desired_forward: Option<Dir3>
Point the negative Z axis of the characetr model in that direction during the dash.
This input parameter is cached when the action starts. This means that the control system does not have to make sure the direction reamins the same even if the player changes it mid-dash.
allow_in_air: bool
Allow this action to start even if the character is not touching ground nor in coyote time.
speed: Float
The speed the character will move in during the dash.
brake_to_speed: Float
After the dash, the character will brake until its speed is below that number.
acceleration: Float
The maximum acceleration when starting the jump.
brake_acceleration: Float
The maximum acceleration when braking after the jump.
Irrelevant if brake_to_speed
is set to infinity.
input_buffer_time: Float
A duration, in seconds, where a player can press a dash button before a dash becomes possible (typically when a character is still in the air and about the land) and the dash action would still get registered and be executed once the dash is possible.
Trait Implementations§
Source§impl Clone for TnuaBuiltinDash
impl Clone for TnuaBuiltinDash
Source§fn clone(&self) -> TnuaBuiltinDash
fn clone(&self) -> TnuaBuiltinDash
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TnuaBuiltinDash
impl Debug for TnuaBuiltinDash
Source§impl Default for TnuaBuiltinDash
impl Default for TnuaBuiltinDash
Source§impl TnuaAction for TnuaBuiltinDash
impl TnuaAction for TnuaBuiltinDash
Source§const NAME: &'static str = "TnuaBuiltinStraightDash"
const NAME: &'static str = "TnuaBuiltinStraightDash"
Source§const VIOLATES_COYOTE_TIME: bool = true
const VIOLATES_COYOTE_TIME: bool = true
Source§type State = TnuaBuiltinDashState
type State = TnuaBuiltinDashState
Source§fn initiation_decision(
&self,
ctx: TnuaActionContext<'_>,
being_fed_for: &Stopwatch,
) -> TnuaActionInitiationDirective
fn initiation_decision( &self, ctx: TnuaActionContext<'_>, being_fed_for: &Stopwatch, ) -> TnuaActionInitiationDirective
Source§fn apply(
&self,
state: &mut Self::State,
ctx: TnuaActionContext<'_>,
_lifecycle_status: TnuaActionLifecycleStatus,
motor: &mut TnuaMotor,
) -> TnuaActionLifecycleDirective
fn apply( &self, state: &mut Self::State, ctx: TnuaActionContext<'_>, _lifecycle_status: TnuaActionLifecycleStatus, motor: &mut TnuaMotor, ) -> TnuaActionLifecycleDirective
Source§fn proximity_sensor_cast_range(&self) -> Float
fn proximity_sensor_cast_range(&self) -> Float
Auto Trait Implementations§
impl Freeze for TnuaBuiltinDash
impl RefUnwindSafe for TnuaBuiltinDash
impl Send for TnuaBuiltinDash
impl Sync for TnuaBuiltinDash
impl Unpin for TnuaBuiltinDash
impl UnwindSafe for TnuaBuiltinDash
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self
using default()
.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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