Skip to content

Commit

Permalink
Use convex hull instead of trimesh
Browse files Browse the repository at this point in the history
  • Loading branch information
janhohenheim committed Jun 19, 2024
1 parent 43d1bde commit 9a2f564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/level_instantiation/on_spawn/collider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ fn spawn(
let Ok(mesh_handle) = mesh_handles.get(child) else {
continue;
};
// Cannot fail: we already load all the meshes at startup.
// Unwrap cannot fail: we already load all the meshes at startup.
let mesh = meshes.get(mesh_handle).unwrap();
let collider = XpbdCollider::trimesh_from_mesh(mesh)
let collider = XpbdCollider::convex_hull_from_mesh(mesh)
.context("Failed to create collider from mesh")?;
commands.entity(child).insert((
collider,
Expand Down

0 comments on commit 9a2f564

Please sign in to comment.