comments
This commit is contained in:
parent
a98d3b8955
commit
1193797a1e
|
@ -15,12 +15,11 @@ pub fn shoot_bullet(
|
||||||
_up: Vec3,
|
_up: Vec3,
|
||||||
caliber: Caliber
|
caliber: Caliber
|
||||||
) {
|
) {
|
||||||
//let transform = Transform::from_translation(firing_point).look_at(target, up)
|
|
||||||
// Spawn muzzle flash LIGHT
|
// Spawn muzzle flash LIGHT
|
||||||
commands.spawn(
|
commands.spawn(
|
||||||
(PointLightBundle {
|
(PointLightBundle {
|
||||||
point_light: PointLight {
|
point_light: PointLight {
|
||||||
//252, 238, 128
|
//RGB 252, 238, 128
|
||||||
color: Color::Rgba { red: 252., green: 238., blue: 128., alpha: 0.5 },
|
color: Color::Rgba { red: 252., green: 238., blue: 128., alpha: 0.5 },
|
||||||
intensity: 0.005,
|
intensity: 0.005,
|
||||||
range: 50.0,
|
range: 50.0,
|
||||||
|
@ -32,9 +31,6 @@ pub fn shoot_bullet(
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}, MuzzleFlashMarker(Timer::new(Duration::from_millis(10), TimerMode::Once)))
|
}, MuzzleFlashMarker(Timer::new(Duration::from_millis(10), TimerMode::Once)))
|
||||||
);
|
);
|
||||||
|
|
||||||
println!("origin: {}", firing_point.translation);
|
|
||||||
println!("end: {}", firing_point.forward() * caliber.range());
|
|
||||||
commands.spawn(
|
commands.spawn(
|
||||||
MaterialMeshBundle {
|
MaterialMeshBundle {
|
||||||
mesh: {
|
mesh: {
|
||||||
|
@ -51,7 +47,6 @@ pub fn shoot_bullet(
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue