Skip to content
Discussion options

You must be logged in to vote

Hi, you are spawning new entity with mesh and material every loop in the for loop - notice the commands.spawn- and entities unless removed are persistent during runtime. So from the draw system remove the whole commands.spawn.

And then you need to add the MaterialMesh2Bundle to the setup system. You are already spawning new entity there so add the bundle to that location entity.

Also your Location component is redundant because Transform and GlobalTransform, which are added by MaterialMesh2Bundle, are Bevy's default position components.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@edwardloveall
Comment options

Answer selected by edwardloveall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants