Skip to content

Commit

Permalink
sliding doesn't work?
Browse files Browse the repository at this point in the history
  • Loading branch information
meyerzinn committed May 2, 2023
1 parent 513cb3d commit 117424b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/voxel/world/physics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,11 @@ fn step(
.floor()
.as_ivec3();

println!(
"pos: {}, start: {}, end: {}",
aabb.center, start, end
);
// println!("pos: {}, start: {}, end: {}", aabb.center, start, end);

assert!(start.cmple(end).all());

let all_voxels = iproduct!(start.x..end.x, start.y..end.y, start.z..end.z)
let all_voxels = iproduct!(start.x..=end.x, start.y..=end.y, start.z..=end.z)
.map(|(x, y, z)| IVec3::new(x, y, z))
.collect_vec();

Expand All @@ -156,8 +153,8 @@ fn step(
.collect_vec();

// println!(
// "pos: {}, voxels: {:?}, interesting voxels: {:?}",
// transform.translation, all_voxels, interesting_voxels
// "voxels: {:?}, interesting voxels: {:?}",
// all_voxels, interesting_voxels
// );

if let Some(collision) = interesting_voxels
Expand Down

0 comments on commit 117424b

Please sign in to comment.