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) { ... }
}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
Vanilla ThrowableProjectile.getAirDrag.
Sourcefn throwable_default_gravity(&self) -> f64
fn throwable_default_gravity(&self) -> f64
Vanilla ThrowableProjectile.getDefaultGravity (0.03).
Sourcefn apply_inertia(&self)
fn apply_inertia(&self)
Vanilla ThrowableProjectile.applyInertia (water vs air drag).
Sourcefn throwable_projectile_tick(&self)
fn throwable_projectile_tick(&self)
Vanilla ThrowableProjectile.tick.
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".