diff --git a/shared/src/lib.rs b/shared/src/lib.rs index 98bff1d..24d3ab2 100644 --- a/shared/src/lib.rs +++ b/shared/src/lib.rs @@ -153,11 +153,10 @@ pub fn spawn_projectile(commands: &mut Commands, origin: Vec2, direction: Vec2) ))) //.insert(Collider::ball(0.1)) .insert(RigidBody::Dynamic) - .insert(Velocity::linear(direction)) + .insert(Velocity::linear(direction.normalize() * 130.)) //.insert(ActiveEvents::COLLISION_EVENTS) .insert(Projectile { duration: Timer::from_seconds(3.5, false), - direction, }) .id() } @@ -165,5 +164,4 @@ pub fn spawn_projectile(commands: &mut Commands, origin: Vec2, direction: Vec2) #[derive(Debug, Component)] pub struct Projectile { pub duration: Timer, - pub direction: Vec2, }