Open
Description
How can Bevy's documentation be improved?
I was creating meshes like this. (Got the code from some example I think)
let mut bevy_mesh = Mesh::new(
PrimitiveTopology::TriangleList,
RenderAssetUsages::RENDER_WORLD,
);
bevy_mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, positions);
...
commands
.spawn((
Name::new(primitive.name.to_string()),
Mesh3d(meshes.add(bevy_mesh)),
...
Everything seemed to be rendered correctly but to my surprise picking was only working for bevy primitives and not for my meshes. After quite some searching I found out that I need to set the asset_usage to
RenderAssetUsages::MAIN_WORLD | RenderAssetUsages::RENDER_WORLD
// or
RenderAssetUsages::default()
to be able to pick the mesh.
Documenting that RenderAssetUsages::MAIN_WORLD
requirement would have saved me a lot of time.