pub struct PlayerInputFrame {
pub throttle: Option<u8>,
pub steer: Option<u8>,
pub dodge_impulse: Option<(f32, f32, f32)>,
pub dodge_torque: Option<(f32, f32, f32)>,
}Expand description
Replay-driven vehicle input/state for a player at a single frame.
Captured from the car’s TAGame.Vehicle_TA actor and dodge component.
These let a renderer drive accurate wheel steering/spin and flip direction
instead of estimating them from position deltas. The rarely-flipping driving
flag lives in the coalesced PlayerCameraStateChange stream instead.
Every field is optional: it is None when the replay does not replicate
that attribute for the frame.
Fields§
§throttle: Option<u8>Raw throttle byte (0-255, ~128 neutral); convert at display time.
steer: Option<u8>Raw steer byte (0-255, ~128 centered); convert at display time.
dodge_impulse: Option<(f32, f32, f32)>Impulse vector (x, y, z) in raw replay units of the most recent
dodge. Meaningful while PlayerFrame::Data::dodge_active is set.
dodge_torque: Option<(f32, f32, f32)>Torque vector (x, y, z) in raw replay units of the most recent dodge.
Trait Implementations§
Source§impl Clone for PlayerInputFrame
impl Clone for PlayerInputFrame
Source§fn clone(&self) -> PlayerInputFrame
fn clone(&self) -> PlayerInputFrame
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 PlayerInputFrame
Source§impl Debug for PlayerInputFrame
impl Debug for PlayerInputFrame
Source§impl Default for PlayerInputFrame
impl Default for PlayerInputFrame
Source§fn default() -> PlayerInputFrame
fn default() -> PlayerInputFrame
Source§impl PartialEq for PlayerInputFrame
impl PartialEq for PlayerInputFrame
Source§fn eq(&self, other: &PlayerInputFrame) -> bool
fn eq(&self, other: &PlayerInputFrame) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PlayerInputFrame
impl Serialize for PlayerInputFrame
impl StructuralPartialEq for PlayerInputFrame
Source§impl TS for PlayerInputFrame
impl TS for PlayerInputFrame
Source§type WithoutGenerics = PlayerInputFrame
type WithoutGenerics = PlayerInputFrame
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or ().
The only requirement for these dummy types is that EXPORT_TO must be None. Read moreSource§type OptionInnerType = PlayerInputFrame
type OptionInnerType = PlayerInputFrame
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete() -> String
fn decl_concrete() -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl() -> String
fn decl() -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline() -> String
fn inline() -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened() -> String
fn inline_flattened() -> String
This function will panic if the type cannot be flattened.
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported.The returned path does not include the base directory from
TS_RS_EXPORT_DIR. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies() -> Vec<Dependency>where
Self: 'static,
fn dependencies() -> Vec<Dependency>where
Self: 'static,
Source§fn export() -> Result<(), ExportError>where
Self: 'static,
fn export() -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all() -> Result<(), ExportError>where
Self: 'static,
fn export_all() -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read moreSource§fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read more