struct
GpuSwarmComponent
A swarm simulated entirely on the GPU (boids: separation, alignment, cohesion) and drawn from the same buffers through the GPU-culled instanced path. The agents live in a cube of side 2 x Half Size around the entity and wrap at its faces. Changing the count, the cube, the radius or the seed rebuilds the swarm from its seed.
- Module
- GpuEcs
- Header
#include "GpuEcs/GpuSwarmComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
bool | enabled | Default true. |
int32_t | agents | Default 100000. |
float | halfSize | Default 40.0f. |
float | radius | Default 2.0f. |
float | maxSpeed | Default 6.0f. |
float | minSpeed | Default 2.0f. |
float | separation | Default 1.5f. |
float | alignment | Default 1.0f. |
float | cohesion | Default 0.6f. |
float | agentSize | Default 0.5f. |
Vec3 | color | Default Vec3(0.85f, 0.55f, 0.2f). |
int32_t | seed | Default 1. |
bool | simulateInEditor | Off, the swarm stands still in the editor and moves only at play. Default false. |
uint64_t | steps | Default 0. |
Generated from GpuEcs/GpuSwarmComponent.h via gpuecs.json · Oct 31, 2026Version 1.0.0