mesh_picking
not updating when mesh data changes, bug or intended?
#18221
Labels
A-Assets
Load files from disk to use for things like images, models, and sounds
A-Picking
Pointing at and selecting objects of all sorts
C-Bug
An unexpected or incorrect behavior
D-Straightforward
Simple bug fixes and API improvements, docs, test and examples
S-Ready-For-Implementation
This issue is ready for an implementation PR. Go for it!
Bevy version
0.15.3
What you did
Might be a bug with
mesh_picking
. I noticed that when I adjusted the vertex positions on aPlane3d
in real time theTrigger<Pointer<Click>>
events would still fire, but only based on the dimensions of the initial mesh.The updates I made to the
Mesh3d
vertex positions wouldn't affect it. Visually I could see the new mesh was larger, but if I clicked anywhere in those zones nothing happened. I had to click the original position to get it to fire.I was using
mesh.insert_attribute(Mesh::ATTRIBUTE_POSITION, new_positions.clone());
to adjust the vertex positions.What went wrong
Mesh3d
vertex positions does not updatemesh_picking
Additional information
I found I was able to get it to work, as intended, after updating the vertex position by removing the
Aabb
component and re-adding it:The text was updated successfully, but these errors were encountered: