Workshop › Angry Birds-style Slingshot › Step 12 of 47
Gravity pulls every body down: each frame it adds a little to vy. The sideways speed never changes, the fall keeps
speeding up, and together they draw a curve: a parabola.
```js
const GRAVITY = 0.25
for (const b of bodies) {
b.vy += GRAVITY
b.x += b.vx
```GRAVITY is added to vy every frame, before the body moves.vy is negative and shrinks towards 0; then it grows and the body falls faster and faster.const GROUND = 290 write const GRAVITY = 0.25.step, write b.vy += GRAVITY as the first line inside the for loop.Skills: Velocity and gravity
← Move by the velocity Land on the ground →