Hi! I’m porting my navmesh navigation crate into Amethyst and one of request was to be able to build navmesh objects from GLTF - is there an example of how i can get list of vertices and triangles from that object?
GltfPrefab to get a reference to the prefab data (the big “plan” the gltf describes) using your handle. Inside of it you will find a mesh field containing a mesh handle that you can use with the
Mesh. This should give you direct (immutable) access to the mesh data. If you need more details on one of those steps feel free to ask!
Only issue with that is that you can’t actually read the mesh data from Mesh… https://docs.amethyst.rs/master/amethyst_rendy/rendy/mesh/struct.Mesh.html
We used to have the GltfPrefab add the MeshData struct as a component on the entity being created, but this was removed by the renderer changes and never replaced with something else
Yeah that’s right, it’s probably a missing feature in the new renderer. Maybe we should open an issue?
i think we should - otherwise i’ll have to crease dedicated asset which is not the best solution to this problem ;o