diff --git a/src/map.rs b/src/map.rs index 89b8f35..c96a61b 100644 --- a/src/map.rs +++ b/src/map.rs @@ -185,22 +185,23 @@ fn spawn_colliders( ) { for (map_entity, map, spawn_colliders) in &maps { if **spawn_colliders { - commands - .entity(map_entity) - .remove::() - .insert(RigidBody::Fixed); + commands.entity(map_entity).remove::(); for y in 0..map.height { for x in 0..map.width { if let Some(tile) = map.at(x, y) { if tile.blocks_motion() { let id = commands .spawn(( + RigidBody::Fixed, TransformBundle::from_transform(Transform::from_xyz( x as f32 + 0.5, y as f32 + 0.5, 0., )), Collider::cuboid(0.5, 0.5), + ActiveCollisionTypes::default() + | ActiveCollisionTypes::KINEMATIC_STATIC + | ActiveCollisionTypes::DYNAMIC_STATIC, MapObstruction, )) .id(); diff --git a/src/navigation.rs b/src/navigation.rs index d424733..02be662 100644 --- a/src/navigation.rs +++ b/src/navigation.rs @@ -6,7 +6,7 @@ use bevy_tts::Tts; use leafwing_input_manager::{axislike::DualAxisData, prelude::*}; use crate::{ - core::{Angle, Area, CardinalDirection, GlobalTransformExt, Player}, + core::{Angle, Area, CardinalDirection, GlobalTransformExt, Player, TransformExt}, error::error_handler, exploration::{ExplorationFocused, Exploring}, log::Log, @@ -136,6 +136,7 @@ fn tick_snap_timers(time: Res