Skip to content

Click-drag rotation

Fully implemented ability to left-click-drag the mouse to rotate sides of the cube. It works by tracing a ray against all objects and remembering the world space position and normal vector of the clicked surface, and using that to create a plane in 3d space. After dragging the mouse for a certain distance in screen space (30 pixels in any direction), it traces a ray into that plane to determine the direction the cubelets should rotate. This ensures rotations can happen on any visible surface, in any given direction.

Merge request reports

Loading