# Step 5 - Spring Bounces

> Add spring pads to Babylon Bros that launch the hero upward on collision when descending, with a compress animation and sound.

Source: https://doc.babylonjs.com/toolsAndResources/flowGraphEditor/babylonBrosTutorial/springs

## Goal

Make `spring_1` and `spring_2` launch the hero when he lands on them. Bounce only when the hero is descending, so it feels like a real spring.

Open this step in the editor: [#YCDRLC](https://flowgraph.babylonjs.com/#YCDRLC) (scene `P41T6E#2`).

![Spring graph: collision while descending launches the hero upward](https://doc.babylonjs.com/img/tools/flowGraphEditor/tutorial/springs.webp)

Run this step:

- [Playground: Babylon Bros - Springs](https://playground.babylonjs.com/#765E20#0) - Tutorial step: bounce on spring pads, powered by flow graph #YCDRLC.

## Blocks Used

- `PhysicsCollisionEvent` (spring body)
- `GetLinearVelocity`, `ExtractVector3`, `LessThan` (descending check)
- `Branch` ("can bounce?")
- `SetLinearVelocity` (launch)
- `PlayAnimation` (compress), `PlaySound` (boing)

## Step By Step

### 1. Detect The Landing

Add `PhysicsCollisionEvent` on `spring_1`. Read the hero velocity, extract `y`, and test `LessThan 0` so it bounces only while descending. Feed into a `Branch`.

### 2. Launch

On `true`, build a launch velocity with `CombineVector3` (keep x, set a strong positive y) and apply it with `SetLinearVelocity`. Trigger the compress `PlayAnimation` and the boing `PlaySound`.

### 3. Duplicate

Group the spring logic and paste it for `spring_2`, re-targeting the collision body and animation. This is the same reuse pattern from the coin step.

## Editor Features

- Lower the time scale to watch the bounce frame by frame.
- Add a `DebugBlock` on the launch velocity to confirm the value flowing through.

## Test And Save

Run and bounce on a spring. Save; match `#YCDRLC`. Continue with [Step 6 - Enemies](https://doc.babylonjs.com/toolsAndResources/flowGraphEditor/babylonBrosTutorial/enemies).

## Further reading

- [Step 4 - Collect Coins](https://doc.babylonjs.com/toolsAndResources/flowGraphEditor/babylonBrosTutorial/coins)
- [Step 6 - Enemies](https://doc.babylonjs.com/toolsAndResources/flowGraphEditor/babylonBrosTutorial/enemies)
