pub struct ProjectileParams {Show 16 fields
pub speed: f32,
pub acceleration: f32,
pub gravity: f32,
pub max_range: f32,
pub pierce_count: u32,
pub split_count: u32,
pub fork_count: u32,
pub chain_count: u32,
pub chain_radius: f32,
pub homing: bool,
pub homing_strength: f32,
pub aoe_on_impact: bool,
pub aoe_radius: f32,
pub visual_trail: String,
pub impact_effect: String,
pub size: f32,
}Fields§
§speed: f32§acceleration: f32§gravity: f32§max_range: f32§pierce_count: u32§split_count: u32§fork_count: u32§chain_count: u32§chain_radius: f32§homing: bool§homing_strength: f32§aoe_on_impact: bool§aoe_radius: f32§visual_trail: String§impact_effect: String§size: f32Implementations§
Source§impl ProjectileParams
impl ProjectileParams
pub fn default_arrow() -> Self
pub fn default_fireball() -> Self
pub fn simulate_trajectory( &self, origin: Vec3, direction: Vec3, dt: f32, steps: u32, ) -> Vec<Vec3>
pub fn homing_update(&self, vel: Vec3, to_target: Vec3, dt: f32) -> Vec3
Trait Implementations§
Source§impl Clone for ProjectileParams
impl Clone for ProjectileParams
Auto Trait Implementations§
impl Freeze for ProjectileParams
impl RefUnwindSafe for ProjectileParams
impl Send for ProjectileParams
impl Sync for ProjectileParams
impl Unpin for ProjectileParams
impl UnsafeUnpin for ProjectileParams
impl UnwindSafe for ProjectileParams
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.