Particlefilter Module Reference
Module defined in `lua/vehicle/particlefilter.lua`. Filters collision events to determine which impacts should trigger particle effects (sparks, dust, debris). Evaluates perpendicular velocity and penetration depth thresholds to avoid spawning particles for minor or irrelevant contacts.
Module defined in lua/vehicle/particlefilter.lua. Filters collision events to determine which impacts should trigger particle effects (sparks, dust, debris). Evaluates perpendicular velocity and penetration depth thresholds to avoid spawning particles for minor or irrelevant contacts.
See Also
State Fields
| Variable | Description |
|---|---|
particleData | Template table for collision packet structure. |
Public API
| Function | Signature | Description |
|---|---|---|
nodeCollision | (p) (**hook**) | Evaluates if perpendicularVel vs depth warrants particle spawning. Called automatically by the engine for every node collision event. |
Usage Example
-- This module is used automatically by the engine. You don't typically call it directly.
-- To customize particle thresholds, modify the JBeam particle definitions.
-- The collision packet `p` contains: perpendicularVel, depth, materialID, nodeId, etc.PartCondition Module Reference
Module defined in `lua/vehicle/partCondition.lua`. Tracks the long-term health, mileage (odometer), and visual wear of every installed vehicle part. Used by the career/campaign systems to persist vehicle condition across sessions — parts degrade over time and use, affecting both gameplay (repair costs, performance) and visuals (paint wear, rust). Supports condition snapshots for save/restore.
Particles Module Reference
Module defined in `lua/common/particles.lua`. Manages the global registry of material-to-particle interaction rules. Defines which particle effects (dust, sparks, mud, snow) are spawned when specific material pairs interact during collisions, tire contact, or scraping. Shared across both GE and VE contexts.