From 9225408422abb534ac4a9a3e7ae6e5a65a048a3c Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Thu, 5 Dec 2024 08:51:03 -0800 Subject: [PATCH] update to bevy_spatial 0.10 --- Cargo.lock | 3 ++- Cargo.toml | 2 +- src/lib.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 137c9f3..23ba691 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1041,7 +1041,8 @@ dependencies = [ [[package]] name = "bevy_spatial" version = "0.10.0" -source = "git+https://github.com/laundmo/bevy-spatial.git?rev=9ac313ac6173b440f50954b696dc2063513b4f37#9ac313ac6173b440f50954b696dc2063513b4f37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce9d7e0f0b55570cb0d059542787fa22300db805dbb0ebc5e9172ca5c1bd48dc" dependencies = [ "bevy", "kd-tree", diff --git a/Cargo.toml b/Cargo.toml index 6700bd0..ee6e287 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,5 +9,5 @@ gizmos = [] [dependencies] argh = "0.1" bevy = "0.15" -bevy_spatial = { git = "https://github.com/laundmo/bevy-spatial.git", rev = "9ac313ac6173b440f50954b696dc2063513b4f37" } #"0.10.0" +bevy_spatial = "0.10" rand = "0.8" diff --git a/src/lib.rs b/src/lib.rs index 7617e82..92a7bfb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -111,7 +111,7 @@ pub fn update_vel( let bdir = *bp - pos; let dist = bdir.length(); let rot = Quat::from_rotation_arc(dir, bdir.normalize()); - let s = (dist / (BUDDY_RADIUS * 1.2)).min(1.0); + let s = (dist / (BUDDY_RADIUS)).min(1.0); let rot = Quat::IDENTITY.slerp(rot, s); dir = rot.mul_vec3(dir).normalize(); }