I’m trying to use Drag3D in order to get 3D position at the mouse coordinates. I’ve seen this thread and that demo is exactly what I’m trying to do: http://www.mail-archive.com/away3d-dev@googlegroups.com/msg15129.html
From the API documentation, getIntersect() should be doing what I need, but I’m getting odd results. In my code I wrote:
movementPlane = new Drag3D(view, null, “xz”);
But this command:
movementPlane.getIntersect(mouseX, mouseY)
keeps returning (0, 0, 60) no matter where the mouse is located.
What am I doing wrong?
ADDITION: I just realized (0, 0, 60) is the position of the camera. When I changed it’s coordinates, sure enough now getIntersect() is returning those new coordinates.
So, why is getIntersect() returning the coordinates of the camera and not coordinates on the plane?