EmiOnGit / warbler_grass

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

grass doesn't show up anymore with `WarblersExplicitBundle` #52

Closed EmiOnGit closed 1 year ago

EmiOnGit commented 1 year ago
    I've updated to 0.3 and changed my spawning code to use the `WarblersExplicitBundle`, since that seemed like the closest thing to my existing grass generation code. However, now my grass doesn't show up anymore 😱 

Code: https://github.com/janhohenheim/foxtrot/pull/228/files#diff-f7cf21045cf163dc0a11d0ebf9b1d7541c14da67855b984f66147b482cbfeed9L48-L66 image Looking at the generated positions, they seem valid to me: image

Any idea on what I might be doing wrong? Does this have something to do with the grass not being visible from the start and thus somehow not entering a cache?

_Originally posted by @janhohenheim in https://github.com/EmiOnGit/warbler_grass/discussions/47#discussioncomment-5308728_

EmiOnGit commented 1 year ago

Alright it seems it was no visible because you ran the spawn in PostUpdate resulting in the Aabb added by bevy and not by warblers_grass. Therefore the grass was invisible thanks to the frustum culling. I pushed the fix to the main branch. Can you test if everything works for you on main?

janhohenheim commented 1 year ago

Cool, thanks for reacting so quickly! Will check when I'm home.

janhohenheim commented 1 year ago

Works like a charm, thanks again! I love the new logo btw, looks very friendly 😄

EmiOnGit commented 1 year ago

Ah don't worry, actually I'm almost happy about feedback. It's hard to write something without knowing how it works

Thanks I wanted to try my art skills :D