Colliders¶
A ParticleCollider defines a collision volume that every particle in the enclosing ParticleSystem is tested against after integration. The collider’s transform positions and orients the shape in world space.
This page catalogs the stock collider shapes and documents the plugin-defined Bounce and Friction properties that control response.
Response parameters¶
Every ParticleCollider has two plugin-defined properties that control what happens when a particle hits the surface:
Bounce: coefficient of restitution
[0..1].0is inelastic (the particle sticks at zero normal velocity after contact),1is perfectly elastic (the particle reflects with no loss). Default0.5.Friction: tangential velocity damping
[0..1].0is frictionless (velocity along the surface is preserved),1is full stop (tangential velocity is zeroed on contact). Default0.1.
These are applied by the collider response template after the shader reports a hit, so they work identically across every stock and custom collider.
Containment mode¶
Every stock collider also carries a Collider.KeepInside bool that flips which side of the surface is treated as solid.
KeepInside = false (default): particles outside the volume pass freely, particles entering the volume are pushed back out. The outward-facing surface is solid.
KeepInside = true: particles inside the volume pass freely, particles trying to leave bounce off the inner-facing surface. The volume becomes a confining shell.
For Collider_Plane the flag is a half-space flip: the same plane geometry, but the opposite half is now the “outside”. A horizontal plane with KeepInside = false is a floor; the same plane with KeepInside = true is a ceiling (or a water surface seen from below) — no rotation needed.
The shape and node transform are unchanged in either mode; only the predicate and the surface normal flip.
Stock collider shapes¶
Stock ColliderMaterial assets live in ParticlesAssetPackage/Materials/Particles/. All of them implement the shape test; response (bounce, friction) is handled by the shared collider template.
Plane¶
Infinite plane with normal along the collider node’s local +Y. Move the node to position the plane in the world.
Shape properties: none: the shape is fully defined by the node transform.
Canonical use: ground plane.
With KeepInside = true: the half-space flips. The same plane node now acts as a ceiling (or a water surface seen from below) — particles approaching from the opposite side bounce off the same plane geometry. No rotation needed.
Box¶
Axis-aligned box centred on the collider node. Scale the collider node to resize; the stock shader derives the half-extents from the node’s non-uniform scale.
Shape properties: none: driven entirely by the node transform.
With KeepInside = true: the interior becomes a confining chamber. Particles spawned inside the box bounce off the inner walls.
Sphere¶
Sphere centred on the collider node.
Shape properties: Radius.
With KeepInside = true: a snow-globe. A point emitter at the centre firing outward fills the sphere with particles that bounce off the inner shell.
Cylinder¶
Finite-length cylinder along the collider node’s local Y axis.
Shape properties: Radius, Height.
With KeepInside = true: a pipe or vial. Particles spawned along the axis bounce off the inner wall and the two end caps.
Capsule¶
Swept sphere: a cylinder along Y capped with hemispheres at each end.
Shape properties: Radius, Height (cylindrical section; total length is Height + 2 × Radius).
With KeepInside = true: a stadium-shaped chamber with rounded ends. Useful when the corners of a cylindrical cage would otherwise trap particles.
Cone¶
Cone along the collider node’s local +Y, with tip at the origin and base at Height.
Shape properties: Angle (half-angle at the tip in degrees; 0° is a line, 89° is a near-disc), Height.
With KeepInside = true: a funnel or megaphone interior. Particles spawned along the axis bounce off the inner sloped wall and the base cap.
Composing colliders¶
Multiple ParticleCollider children on one ParticleSystem compose additively: a particle is tested against every collider each sub-step and responds to whichever it hits first.
ParticleSystem
├── ParticleEmitter
├── ParticleAffector AffectorMaterial = Gravity
├── ParticleCollider ColliderMaterial = Plane (ground)
├── ParticleCollider ColliderMaterial = Sphere (Radius = 1, obstacle)
└── ParticleCollider ColliderMaterial = Plane (Ceiling)
Tips:
Keep the collider count modest: every particle tests against every collider each sub-step.
See also¶
Writing custom compute materials: to write your own collider material.
Particle editor reference for the full
Collider.*property catalog.