Mass entity colliders?

I am trying to use the mass system for generating a lot of objects (let’s just say 100.000, they will mostly be ‘connected’ as a grid)

  1. for this I use the Visualization Trait with a ISM. But is there a way to add collision to entity (so a player can’t walk through it or grids of entity’s can collide with each other) without switching to an actor (or is there a way to keep the ISM alive and only spawn a actor for collisions, but wouldn’t this create a problem if the grid is moving?)

  2. Is there a better approach for moving a grid of 10.000 entity’s than just have a processor that moves them all one by one with a newly added transform? Something like actors that have an parent actor

  3. Is it possible to filter a Entity Query based on a value of a fragment (or a tag)? this because I want to identify each grid to move it, but if I would have to create 1000 tags to identify each grid I would also be limited to 1000 grids and it would be quite a hell

2 Likes

Octree - Wikipedia - this is the solution.
I also found a project that implements MassEntity using an octree for collisions:
GitHub - Tewesday/RealmDemo: An attempt at RTS + Mass implementation