Workshop › Puzzle Bobble-style Bubble Shooter › Step 11 of 31
Every frame the flying bubble moves by its velocity. update does it, and the loop calls it before draw.
```js
function update() {
if (!shot) return
shot.x += shot.vx
shot.y += shot.vy
}
update()
```const clampAim ... write update, with an empty line after it.loop, call update() before draw().Skills: Velocity and gravity, The game loop
← Fire! Bounce off the walls →