Skip to content

Commit 21149de

Browse files
committed
docs: on-impact particles + On Impact node + throwing (PFX-C)
1 parent ffb7cee commit 21149de

3 files changed

Lines changed: 37 additions & 2 deletions

File tree

‎docs/nodes/onimpact.md‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# On Impact
2+
3+
Fires a pulse when a [physics simulation](../physics.md) lands the connected object on the ground or another object.
4+
5+
**Output:** event (wire into a [Particles](particle.md) trigger, a [Counter](counter.md), or an [Object Selector](objectselector.md))
6+
7+
## How it works
8+
9+
While a simulation runs, the peer stepping the physics detects each real contact — a falling crate hitting the floor, a thrown ball hitting a wall — and pulses this node for **everyone** (the trigger rides the same replicated stamp as [On Click](onclick.md)). Gentle settling and rolling are filtered out: the object must actually be falling, and each object has a short cooldown so bounces don't spam.
10+
11+
## Parameters
12+
13+
| Parameter | Default | Meaning |
14+
|---|---|---|
15+
| minStrength | 1 | minimum impact speed (m/s, downward at contact) — raise it so only hard landings count |
16+
17+
## Targeting
18+
19+
Like On Click, the node fires for the object it *reaches* in the graph: wire it into an [Object Selector](objectselector.md) (directly or through other nodes), or drop it unwired inside an object's own flow to target that object.
20+
21+
## Practical example
22+
23+
Sparks + a thud when a crate lands:
24+
25+
1. Give the crate a **Dynamic** body (Inspector ▸ Physics).
26+
2. In its flow: **On Impact → Particles** (`trigger` input, emission *burst*, preset *Sparks*), and **On Impact → Counter** if you want to count landings.
27+
3. Press <kbd>P</kbd>, lift the crate with the gizmo, drop it. Sparks on landing, for every peer.
28+
29+
!!! note
30+
Simplest version, no flow editor at all: set a particle emitter's **Emission** to *On impact* in the Inspector — see [Particle Effects](../particles.md).

‎docs/particles.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@ Right-click empty space ▸ **Add ▸ Effects ▸** places a small marker object
3636

3737
A preset is just a starting point — every value below is editable afterwards.
3838

39-
## Continuous vs burst
39+
## Continuous, burst, and on-impact
4040

4141
- **Continuous** emitters (Sparkles, Fire, Smoke) emit forever.
42-
- **Burst** emitters (Dust puff, Confetti, Sparks) fire all their particles at once, then wait for the next trigger. They auto-fire once when you attach them so you get instant feedback; after that, replay them with **💥 Burst now**, wire an event into the [Particles node](nodes/particle.md), or — coming soon — let them fire automatically when an object hits the ground.
42+
- **Burst** emitters (Dust puff, Confetti, Sparks) fire all their particles at once, then wait for the next trigger. They auto-fire once when you attach them so you get instant feedback; after that, replay them with **💥 Burst now** or wire an event into the [Particles node](nodes/particle.md).
43+
- **On impact (physics)** emitters fire automatically when a [physics simulation](physics.md) lands the object on the ground or another object — a dust puff exactly when the crate hits the floor. Set the object's body to **Dynamic**, set the emitter's **Emission** to *On impact*, and press <kbd>P</kbd>. Every peer sees the same burst. Small settling bounces are filtered out (the object has to be actually falling), and a rolling object won't machine-gun bursts.
44+
45+
!!! tip "Throwing things"
46+
While a simulation runs you can **grab and throw** any dynamic object — drag it with the gizmo on desktop, or grip-grab it in VR — and it flies off with the velocity of your hand when you let go. Heavier objects (higher **Mass**) hit harder. Combine with an on-impact emitter for very satisfying crashes.
4347

4448
## Properties
4549

‎mkdocs.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ nav:
4444
- Visibility: nodes/visibility.md
4545
- On Click: nodes/onclick.md
4646
- Key Press: nodes/keypress.md
47+
- On Impact: nodes/onimpact.md
4748
- Counter: nodes/counter.md
4849
- Shake: nodes/shake.md
4950
- Spin: nodes/spin.md

0 commit comments

Comments
 (0)