By Lawrence
5 minutes
5 minutes
Grab the Hole
Moving the hole means editing the JSON and reloading. We want to pick it up with the mouse and slide it, in either view.
A ray, a plane, a box
The pointer is a ray from the camera through the cursor. A press near the hole grabs it. Each frame after that, the ray meets a plane through the hole that faces the camera, and the hole goes there, kept inside a box. In the top view that plane is y = 0, so x and z move. In the side view, with the hole where the scene puts it, the plane is z = −14, so x and y move. Held over the window's top-left corner:
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.
$9one-time
=