You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems if I want to change the shape afterwards, I need to use its Mesh component...
fnupdate(mutmeshes:ResMut<Assets<Mesh>>,h:&Handle<Mesh>){let mesh = meshes.get_mut(h).unwrap();let attributes = &mut mesh.attributes;for att in&mut attributes.iter_mut(){//TODO do something with attr}}
But it seems the points it returns are the ones after tessellating the shape, which is not very useful if you want to move the original points before tessellation. E.g. it seems to return 6 points instead of the expected 3.
I assume the only way to do this right now is to create a new primitive every frame and delete the old one?
The text was updated successfully, but these errors were encountered:
Yeah, What I have been doing is creating a new primitive SpriteBundle every time I want to change shape then just setting the specific entities mesh (and shape but not sure its needed) to the newly created ones. so like if the handle was mutable h= primitive(... options).mesh
Not sure if I'm doing it incorrectly, but right now it seems difficult if not impossible to modify the shapes at runtime after they've been created.
E.g. if I have a simple path shape like this...
It seems if I want to change the shape afterwards, I need to use its
Mesh
component...But it seems the points it returns are the ones after tessellating the shape, which is not very useful if you want to move the original points before tessellation. E.g. it seems to return 6 points instead of the expected 3.
I assume the only way to do this right now is to create a new primitive every frame and delete the old one?
The text was updated successfully, but these errors were encountered: