-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed
Labels
A-PickingPointing at and selecting objects of all sortsPointing at and selecting objects of all sortsC-DocsAn addition or correction to our documentationAn addition or correction to our documentationD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-PickingPointing at and selecting objects of all sortsPointing at and selecting objects of all sortsC-DocsAn addition or correction to our documentationAn addition or correction to our documentationD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!This issue is ready for an implementation PR. Go for it!