Skip to content

Updating mesh_picking doc to include RenderAssetUsages#19413

Merged
alice-i-cecile merged 4 commits intobevyengine:mainfrom
andristarr:19102.picking-renderassetusages-doc
May 29, 2025
Merged

Updating mesh_picking doc to include RenderAssetUsages#19413
alice-i-cecile merged 4 commits intobevyengine:mainfrom
andristarr:19102.picking-renderassetusages-doc

Conversation

@andristarr
Copy link
Contributor

@andristarr andristarr commented May 28, 2025

Objective

Fixes #19102

Updating mesh_picking doc stating that MAIN_WORLD RenderAssetUsages needs to be on the mesh to be picked.

@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation S-Needs-Review Needs reviewer attention (from anyone!) to move forward A-Picking Pointing at and selecting objects of all sorts labels May 28, 2025
//!
//! By default, all meshes are pickable. Picking can be disabled for individual entities
//! by adding [`Pickable::IGNORE`].
//! By default, all meshes that have both [`bevy_asset::RenderAssetUsages::MAIN_WORLD`] and [`bevy_asset::RenderAssetUsages::RENDER_WORLD`] pickable.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//! By default, all meshes that have both [`bevy_asset::RenderAssetUsages::MAIN_WORLD`] and [`bevy_asset::RenderAssetUsages::RENDER_WORLD`] pickable.
//! By default, all meshes that have both [`bevy_asset::RenderAssetUsages::MAIN_WORLD`] and [`bevy_asset::RenderAssetUsages::RENDER_WORLD`] are pickable.

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that the docs as written are totally correct. I think you need RENDER_WORLD to actually see it, and MAIN_WORLD to pick it. But in theory you could pick invisible meshes (often simplified).

@JMS55, can you confirm?

@JMS55
Copy link
Contributor

JMS55 commented May 28, 2025

I don't know how picking works so can't comment on that, but yes you need RENDER_WORLD just to render it, and MAIN_WORLD is at least required for picking.

I'm not sure if MAIN_WORLD only lets picking work, someone would have to test it.

@andristarr
Copy link
Contributor Author

I will check this tomorrow

@andristarr
Copy link
Contributor Author

I checked this now and RenderAssetUsages::MAIN_WORLD is enough, updated the doc accordingly :)

@andristarr
Copy link
Contributor Author

@alice-i-cecile I think this is RFR

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 29, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 29, 2025
Merged via the queue into bevyengine:main with commit fe678e1 May 29, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Picking Pointing at and selecting objects of all sorts C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: picking requires RenderAssetUsages::MAIN_WORLD

3 participants