Intermediate
Put limits on the orbit
The controls can go under the floor, through the bike and far away, and they orbit a point on the floor.
Orbit the middle of the bike (0, 0.45, 0), keep the distance between 1 and 6 m, never go below the horizon (maxPolarAngle = Math.PI / 2), and turn panning off. Keep the line window.controls = controls; so the checks can read them.
What Check tests
- The controls orbit (0, 0.45, 0)
- The distance stays between 1 and 6 m
- The camera never goes below the horizon
- Panning is off
- A drag far downwards stays above the floor
Stuck? One hint at a time
The solution unlocks after your first Check. Try first: that is where the learning happens.
Runs in your browser. Your code is saved here.
Your page
Press Run to see the page.
Console
Nothing logged yet.