diff --git a/Cargo.toml b/Cargo.toml index 5adf3c2..80da98b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,24 +14,25 @@ speech_dispatcher_0_10 = ["bevy_tts/speech_dispatcher_0_10"] speech_dispatcher_0_11 = ["bevy_tts/speech_dispatcher_0_11"] [dependencies.bevy] -version = "0.13" +version = "0.14" default-features = false features = [ "bevy_gilrs", + "bevy_state", "bevy_winit", "x11", "wayland", - "multi-threaded", + "multi_threaded", "serialize", ] [dependencies] -bevy_rapier2d = "0.25" -bevy_synthizer = "0.6" -bevy_tts = { version = "0.8", default-features = false, features = ["tolk"] } +bevy_rapier2d = "0.27.0-rc.1" +bevy_synthizer = "0.7" +bevy_tts = { version = "0.9", default-features = false, features = ["tolk"] } coord_2d = "0.3" here_be_dragons = { version = "0.3", features = ["serde"] } -leafwing-input-manager = "0.13" +leafwing-input-manager = "0.14" maze_generator = "2" once_cell = "1" pathfinding = "4" diff --git a/src/core.rs b/src/core.rs index c75e7f0..417c86a 100644 --- a/src/core.rs +++ b/src/core.rs @@ -6,7 +6,7 @@ use std::{ sync::RwLock, }; -use bevy::{app::PluginGroupBuilder, prelude::*, utils::FloatOrd}; +use bevy::{app::PluginGroupBuilder, math::FloatOrd, prelude::*}; use bevy_rapier2d::{ parry::query::{closest_points, distance, ClosestPoints}, prelude::*, diff --git a/src/pathfinding.rs b/src/pathfinding.rs index babea0f..b531176 100644 --- a/src/pathfinding.rs +++ b/src/pathfinding.rs @@ -111,7 +111,6 @@ fn find_path_for_shape( let mut should_push = true; let dest = Vector2::new(exit.0 .0 as f32, exit.0 .1 as f32); let shape_vel = dest - pos; - let max_toi = 1.; if query_pipeline .cast_shape( &rigid_body_set, @@ -119,8 +118,11 @@ fn find_path_for_shape( &shape_pos, &shape_vel, &*shape.raw, - max_toi, - true, + ShapeCastOptions { + max_time_of_impact: 1., + stop_at_penetration: true, + ..default() + }, bevy_rapier2d::rapier::pipeline::QueryFilter::new() .predicate(&|h, _c| h != initiator), ) @@ -308,8 +310,11 @@ fn negotiate_path( transform.yaw().radians(), direction, collider, - rapier_context.integration_parameters.dt, - true, + ShapeCastOptions { + max_time_of_impact: 1., + stop_at_penetration: true, + ..default() + }, QueryFilter::new() .predicate(&|entity| obstructions.get(entity).is_ok()) .exclude_sensors() diff --git a/src/sound/pitch_shift.rs b/src/sound/pitch_shift.rs index 4f3e5c0..e795a2a 100644 --- a/src/sound/pitch_shift.rs +++ b/src/sound/pitch_shift.rs @@ -26,7 +26,7 @@ fn tag_behind( continue; } let v = transform.translation() - listener_transform.translation(); - let dot = v.dot(listener_forward); + let dot = v.dot(*listener_forward); let is_behind = dot <= 0.; if is_behind { commands.entity(entity).insert(Behind);