this post was submitted on 26 Jan 2024
14 points (100.0% liked)

Bevy

2 readers
1 users here now

A community for discussion around the bevy game engine! https://bevyengine.org/

founded 11 months ago
MODERATORS
 

It was an interesting task and I learned a lot about how meshes are represented internally.

Initially I used 8 vertices for each wall. But then I discovered that if I needed a different color and normal for each side, then I needed a different vertex! So I reworked the mesh generation to make 20 vertices per mesh (for each side with no bottom).

The project is open source, so if you are interested in the implementation, you can take a look at mesh_update_system. I organize my modules as plugins, so you can copy the module and its submodules into your game with some minor edits and enable WallPlugin.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here