Adjusted firearm firing point forward on the m4
This commit is contained in:
parent
47764f63a1
commit
a98d3b8955
@ -15,7 +15,7 @@ impl Firearm {
|
||||
Firearm::M4A1 => {
|
||||
FirearmData {
|
||||
firing_point: FiringPoint {
|
||||
forward: 0.0,
|
||||
forward: 2.5,
|
||||
up: 0.0,
|
||||
right: 0.0,
|
||||
},
|
||||
|
@ -7,17 +7,17 @@ use crate::comps::core::markers::muzzle_flash::MuzzleFlashMarker;
|
||||
use super::caliber::Caliber;
|
||||
|
||||
pub fn shoot_bullet(
|
||||
mut commands: &mut Commands,
|
||||
mut meshes: &mut ResMut<Assets<Mesh>>,
|
||||
mut materials: &mut ResMut<Assets<StandardMaterial>>,
|
||||
commands: &mut Commands,
|
||||
meshes: &mut ResMut<Assets<Mesh>>,
|
||||
materials: &mut ResMut<Assets<StandardMaterial>>,
|
||||
firing_point: Transform,
|
||||
forward: Vec3,
|
||||
up: Vec3,
|
||||
_up: Vec3,
|
||||
caliber: Caliber
|
||||
) {
|
||||
//let transform = Transform::from_translation(firing_point).look_at(target, up)
|
||||
// Spawn muzzle flash LIGHT
|
||||
/*commands.spawn(
|
||||
commands.spawn(
|
||||
(PointLightBundle {
|
||||
point_light: PointLight {
|
||||
//252, 238, 128
|
||||
@ -31,7 +31,7 @@ pub fn shoot_bullet(
|
||||
visibility: Visibility::Visible,
|
||||
..Default::default()
|
||||
}, MuzzleFlashMarker(Timer::new(Duration::from_millis(10), TimerMode::Once)))
|
||||
);*/
|
||||
);
|
||||
|
||||
println!("origin: {}", firing_point.translation);
|
||||
println!("end: {}", firing_point.forward() * caliber.range());
|
||||
|
Loading…
Reference in New Issue
Block a user