Collide
Function. Bounces particles off static collision surfaces — planes, spheres, boxes and capsules.
Each frame the block tests the segment the particle travelled, from its previous position to its current one, against every primitive of its surface. On contact it rewrites the position and velocity according to the response settings of the primitive that was hit.
Because the test uses the whole segment rather than just the end point, fast particles cannot tunnel through thin surfaces. Up to three contacts are resolved per frame, so a particle driven into a corner bounces off both walls in the same frame instead of leaking through.
Typically you connect the outputs of a ForceMove (or Move) block as inputs, and route the outputs into the Position and Velocity updaters, so the corrected values are what the particle keeps.
Properties & inputs:
- Position (input): Current position, after movement.
- Velocity (input): Current velocity, after movement.
- Prev. position (input): Position before movement. Together with Position it forms the segment that is tested.
- Particle radius (input | property): Radius of the particle for collision purposes. The particle bounces as a sphere of this size, so its surface — not its centre — touches the primitive. Zero, the default, treats the particle as a point. This is a physics setting, independent of the particle's rendered size: set it to match your geometry if you want the two to agree.
- Surface (property): The set of collision primitives. Edit it in the preview viewport — add planes, spheres, boxes and capsules, then move, rotate and scale them with the gizmo.
- Default mode / restitution / friction (property): The response settings a newly added primitive starts with. Each primitive can then override them.
- Show visualizer (property): Draw the surface in the preview while the block is not being edited.
Outputs:
- Position: Position after the collision response.
- Velocity: Velocity after the collision response.
Editing the surface
Select the block to edit its surface in the preview viewport. A toolbar appears on the right of the viewport with one button per primitive type — Plane, Sphere, Box and Capsule. Clicking a button adds that primitive at the origin and selects it; hover a button to see which type it adds.
The button to the left of them shows the primitive you are currently editing, and its menu lists every primitive on the surface, so you can pick one without clicking it in the viewport. Remove deletes the selected primitive.
With a primitive selected, the gizmo moves, rotates and scales it, and the property panel switches from the block's defaults to that primitive's own response settings. Deselect it to get the block defaults back. Each add, remove or edit is a single undo step.
Response modes (per primitive):
- Bounce: Reflects the particle off the surface. Restitution controls how much speed is kept — 0 stops it dead against the surface, 1 gives a full bounce.
- Friction: Slides along the surface without bouncing. Friction controls how quickly the tangential speed is lost — 0 slides freely, 1 stops it.
- Stick: Pins the particle to the point of contact and zeroes its velocity.
Notes:
- Collisions are with the authored surface only. Particles do not collide with each other.
- The surface is static: it does not move with the particles it deflects.
- With a non-zero Particle radius, edges and corners of boxes and of finite planes are rounded by that radius, so a particle rolling over an edge is deflected smoothly rather than catching on a sharp corner.