I wanted to say "thanks" for the Drag3D class. The dragging code I wrote before the class was available wasn't able to handle camera rotations. Unprojecting the camera correctly can be tricky, so I'm thankful that you've shared it with us!
That's all I was going to say, originally, but then I came across an edge case scenario you may not know about? I'm not instantly sure what the solution would be.
Let's say you have a floor, and you're dragging an object on the xy plane. If you bring the camera down, like you were standing on the floor, you're close to parallel with the target plane, which starts to blow out the coordinates when you drag. That's basically to be expected, but something funny happens as you move your cursor further up. As your cursor nears the horizon of the ground plane, the object (understandably) begins to approach infinity. However, if you go beyond the horizon line, it jumps back toward you. Perhaps the value is being evaluated as Infinity, when it should be -Infinity?
Thanks, and have a great day!
