pub trait ThrowableProjectile: Projectile {
// Provided methods
fn get_air_drag(&self) -> f32 { ... }
fn throwable_default_gravity(&self) -> f64 { ... }
fn apply_inertia(&self) { ... }
fn throwable_projectile_tick(self: Arc<Self>) { ... }
fn handle_first_tick_bubble_column(&self) { ... }
}Expand description
Vanilla-shaped behavior shared by entities that extend ThrowableProjectile.
Provided Methods§
Sourcefn get_air_drag(&self) -> f32
fn get_air_drag(&self) -> f32
Air drag multiplier applied to velocity each tick while airborne (0.99, i.e. 1% loss).
Sourcefn throwable_default_gravity(&self) -> f64
fn throwable_default_gravity(&self) -> f64
Downward acceleration applied each tick while this projectile is airborne.
Sourcefn apply_inertia(&self)
fn apply_inertia(&self)
Vanilla ThrowableProjectile.applyInertia (water vs air drag).
Sourcefn throwable_projectile_tick(self: Arc<Self>)
fn throwable_projectile_tick(self: Arc<Self>)
Reached from a subclass’s tick as super.tick(). Applies gravity and
drag, raycasts the move vector, moves to the hit (or full move), updates
rotation, runs the Projectile/Entity base tick, then resolves the hit.
Sourcefn handle_first_tick_bubble_column(&self)
fn handle_first_tick_bubble_column(&self)
Applies bubble-column effects to this projectile on its first tick.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".