From 8c7450d03f259edfe908d080b4d3e4b4e9929b96 Mon Sep 17 00:00:00 2001 From: Franklin Date: Sat, 11 Nov 2023 14:03:22 -0400 Subject: [PATCH] Could not find out how to fix bug where stopped collider would not work as precisely as started collision event --- Cargo.lock | 19 ++++++--- src/logic/core/guns/despawn_shots.rs | 59 ++++++++++++++++++---------- 2 files changed, 53 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e7dff86..7d53470 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2839,6 +2839,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "num-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.32", +] + [[package]] name = "num-integer" version = "0.1.45" @@ -2995,7 +3006,7 @@ dependencies = [ "jni 0.20.0", "ndk", "ndk-context", - "num-derive", + "num-derive 0.3.3", "num-traits", "oboe-sys", ] @@ -3106,7 +3117,7 @@ dependencies = [ "downcast-rs", "either", "nalgebra", - "num-derive", + "num-derive 0.3.3", "num-traits", "rustc-hash", "simba", @@ -3312,8 +3323,6 @@ checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" [[package]] name = "rapier3d" version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62a8a0bd9d3135f7b4eb45d0796540e7bab47b6b7c974f90567ccc5a0454f42b" dependencies = [ "approx", "arrayvec", @@ -3322,7 +3331,7 @@ dependencies = [ "crossbeam", "downcast-rs", "nalgebra", - "num-derive", + "num-derive 0.4.1", "num-traits", "parry3d", "rustc-hash", diff --git a/src/logic/core/guns/despawn_shots.rs b/src/logic/core/guns/despawn_shots.rs index aee8c14..5dd5387 100644 --- a/src/logic/core/guns/despawn_shots.rs +++ b/src/logic/core/guns/despawn_shots.rs @@ -1,5 +1,5 @@ use bevy::prelude::*; -use bevy_rapier3d::prelude::*; +use bevy_rapier3d::{prelude::*, rapier::prelude::IntegrationParameters}; use crate::comps::core::markers::{muzzle_flash::MuzzleFlashMarker, bullet::BulletMarker}; pub fn despawn_muzzle_flashes(mut commands: Commands, mut query: Query<(&mut MuzzleFlashMarker, Entity)>, time: Res