class
CollisionModule
Collision module - bounces particles off the scene
- Module
- Particles
- Header
#include "Particles/ParticleModule.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
ParticleCollisionMode | mode | Default ParticleCollisionMode::Auto. |
float | radius | Collision radius in world units — the particle is treated as a sphere, so a smoke puff can settle on a floor instead of sinking half its billboard into it. Default 0.05f. |
float | bounce | Fraction of the normal velocity kept on bounce (0 = dead stop, 1 = perfectly elastic). Default 0.4f. |
float | friction | Fraction of the tangential velocity removed on bounce, so debris slides to a stop rather than skating forever. Default 0.2f. |
float | lifetimeLoss | Age added on impact as a fraction of the particle's total lifetime, so sparks can die out where they land without a separate event system. Default 0.0f. |
bool | killOnCollide | Kill on first contact — impact puffs and splashes want this rather than a bounce. Default false. |
float | restThreshold | Below this normal speed a resting particle stops being pushed around by the response, which is what keeps settled debris from jittering. Default 0.15f. |
std::vector<FParticleEvent>* | contactSink | Set by ParticleSystem while a Collision sub-emitter listens: every resolved contact is appended here. Null costs nothing. Default nullptr. |
Public functions
| Returns | Name | Description |
|---|---|---|
void | OnUpdateRange | |
void | OnPostIntegrate | |
const char* | GetTypeName | |
Scope<ParticleModule> | Clone | |
uint32_t | GetLastCollisionCount | Contacts resolved by the last OnPostIntegrate, for the tests and the stat overlay. |
Function details
OnUpdateRange
C++
void OnUpdateRange(Particle* particles, size_t count, float deltaTime, const float* normalizedAges) overrideOnPostIntegrate
C++
void OnPostIntegrate(Particle* particles, size_t count, float deltaTime) overrideGetTypeName
C++
const char* GetTypeName() const overrideClone
C++
Scope<ParticleModule> Clone() const overrideGetLastCollisionCount
C++
uint32_t GetLastCollisionCount() constContacts resolved by the last OnPostIntegrate, for the tests and the stat overlay.
Generated from Particles/ParticleModule.h via particles.json · Oct 31, 2026Version 1.0.0