Open code, practice, and notes →
Download source with English comments · for reading
24 · Camera movement·rotation·zoom
Week 4 / original Day 24 · Document and example provided · This is a learning sequence, not a fixed daily workload.
Full roadmap · Workspace usage
Goal
Make control limits and reset behavior consistent.
Prerequisites
02, 06, 20.
Key concepts and explanations
OrbitControls target is the center around which the camera orbits. Pan moves the camera and center relationship, while dolly/zoom behave differently depending on the camera type. Distance and angle limits can reduce movement inside objects or into unnecessary areas.
When damping is enabled, changes continue after input ends. Check whether remaining damping pushes the camera away from the initial position again after reset. Provide pointer/touch instructions and a reset button accessible by keyboard.
Skills you will develop
- Make control limits and reset behavior consistent.
- Reproduce the completion criteria below and answer the self-check questions in your own words.
Exercises
- Save the representative scene's starting position and target.
- Set min/max distance and angle ranges and operate at their extremes.
- Compare reset immediately after dragging, after zooming, and after resizing.
Variables to observe
position, target, min/max distance·angle, damping.
Completion criteria
- Reliably returns to the starting viewpoint.
- Can explain the reasons for control limits.
- Noted which other input devices remain unverified.
Self-check questions
- What changes if you move only the camera and leave target unchanged?
- Can the camera keep moving after reset during damping?
Official references
Experiment notes — fill these in yourself
Goal
Key concepts
Changed variables and predictions
Actual results
What I learned
Remaining questions
Previous: Loading UI and progress · Next: Markers and Raycasting
Linked example and execution scope
Runnable source code · Workspace unit ID: 24-camera-controls
Edit the linked source code in Monaco to apply it to the sandbox preview after checks. Perform the extension exercises and completion criteria yourself and record the results.
Any previously saved code is preserved. To use the new original source, first back up everything as a full JSON file, then select Restore original code. Your notes are not erased.