|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
A shape particles bounce off without any physics: a signed distance a compute kernel can answer per particle. More...


Go to the source code of this file.
Classes | |
| struct | esengine::ecs::ParticleCollider |
Namespaces | |
| namespace | esengine |
| namespace | esengine::ecs |
Enumerations | |
| enum class | esengine::ecs::ParticleColliderShape : i32 { esengine::ecs::Sphere = 0 , esengine::ecs::Box = 1 , esengine::ecs::Capsule = 2 } |
A shape particles bounce off without any physics: a signed distance a compute kernel can answer per particle.
A scene query per particle is not something a million particles can afford, and nothing on the GPU can ask one. A distance function can be asked of every particle, so an emitter whose collisionMode is Sdf bounces off every one of these near it. The CPU simulation answers the same functions, so the look survives a device with no compute.
Definition in file ParticleCollider.hpp.