Skip to content

Commit a40e111

Browse files
committed
Fix merge errors
1 parent cf82a73 commit a40e111

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/collision/broad_phase/bvh_broad_phase.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ fn query_tree(
244244
let entity2 = proxy2.collider;
245245

246246
// Avoid duplicate pairs.
247-
let pair_key = PairKey::new(entity1.index(), entity2.index());
247+
let pair_key = PairKey::new(entity1.index_u32(), entity2.index_u32());
248248
if contact_graph.contains_key(&pair_key) {
249249
continue;
250250
}

src/debug_render/mod.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
mod configuration;
88
mod gizmos;
99

10+
use bevy_math::bounding::Aabb3d;
1011
pub use configuration::*;
1112
pub use gizmos::*;
1213

@@ -255,18 +256,18 @@ fn debug_render_aabbs(
255256
fn debug_render_bvh(bvh: Res<ColliderTrees>, mut gizmos: Gizmos<PhysicsGizmos>) {
256257
for node in bvh.dynamic_tree.bvh.nodes.iter() {
257258
if node.prim_count == 0 {
258-
gizmos.cuboid(
259-
Transform::from_scale(node.aabb.diagonal().into())
260-
.with_translation(node.aabb.center().into()),
259+
gizmos.aabb_3d(
260+
Aabb3d::from_min_max(node.aabb.min, node.aabb.max),
261+
Transform::IDENTITY,
261262
WHITE,
262263
);
263264
}
264265
}
265266
for node in bvh.static_tree.bvh.nodes.iter() {
266267
if node.prim_count == 0 {
267-
gizmos.cuboid(
268-
Transform::from_scale(node.aabb.diagonal().into())
269-
.with_translation(node.aabb.center().into()),
268+
gizmos.aabb_3d(
269+
Aabb3d::from_min_max(node.aabb.min, node.aabb.max),
270+
Transform::IDENTITY,
270271
WHITE,
271272
);
272273
}

0 commit comments

Comments
 (0)