-
-
Notifications
You must be signed in to change notification settings - Fork 266
Open
Labels
Description
bevy_rapier/src/geometry/collider_impl.rs
Lines 739 to 743 in 6aa960b
fn extract_mesh_vertices_indices(mesh: &Mesh) -> Option<(Vec<na::Point3<Real>>, Vec<[u32; 3]>)> { | |
use rapier::na::point; | |
let vertices = mesh.attribute(Mesh::ATTRIBUTE_POSITION)?; | |
let indices = mesh.indices()?; |
If mesh.indices()
doesn't exist, function returns None.
Turns out, indices can be absent from glTF, and the file will still be valid. In this case, bevy Mesh wouldn't have any indices either (but bevy would display it just fine). You can search the internet by keywords "unindexed mesh gltf", and it's full of bug reports about lack of support from various projects...
I'm using osm2world, and it turns out that it generates unindexed meshes, so... Any ideas how to implement it?