EmiOnGit / warbler_grass

A bevy plugin for creating 3d grass in your game
Apache License 2.0
120 stars 11 forks source link

Control width of grass at the base #62

Open thedodd opened 11 months ago

thedodd commented 11 months ago

What problem does this solve or what need does it fill?

It would be awesome to be able to control the width of the generated grass at its base. I'm currently using explicit mode based on my own mesh triangles, but my experimentation so far from the component settings has been fruitless. Perhaps a width setting, similar to height should be accepted.

Describe the solution you'd like

Just as users can declare the height of the grass, being able to declare the width of the grass at the base would be awesome.

Describe alternatives you've considered

N/A

Describe what is for debate

N/A

Additional context

Being able to generate skinny grass, instead of all the grass being rather wide at the base, would be nice in some contexts.

EmiOnGit commented 9 months ago

Hey @thedodd, sorry for not replying, I had to concentrate on my thesis for quite a while and simply forgot. I assume you don't need to answer anymore but I assume that other may have the same problem

Your suggestion to have a width component which can control the width at the base seem fair but I think it posses some difficulties and would make the api a bit more confusing to use as it slowly becomes unclear which settings refer to the chunk and which to the grass blades. It would raise the question, how to detect the base of the grass (given a generic grass mesh), to name an example.

There are actually already 2 ways to archive what you want:

I'm not opposed to have a easier way to change the width with a component. If someone stumbles upon this and would like to have this feature feel free to write a short comment so I now it is wanted

ethereumdegen commented 1 month ago

I achieved this by swapping out the grass mesh but i agree it would be nice if the crate had built in controls for this perhaps. Perhaps it could Mut the 'mesh' that is inside the handle in a simple way in a system. on of some settings resource or something.