Workshop › Lunar Lander › Step 5 of 31
The lander has a position, a velocity and an angle. reset() makes new hills and puts a new lander in the sky.
```js
let lander
function reset() {
makeGround()
lander = { x: 60, y: 40, vx: 1, vy: 0, angle: 0 }
}
reset()
draw()
```lander starts at (60, 40), moving 1 pixel right per frame and not falling yet; angle 0 means upright.reset() replaces the makeGround() call at the bottom: it makes the ground and the lander.let pad ... write let lander.groundY and write reset.makeGround() with reset().Skills: Game states
← The height at any x Draw it around its own middle →