How do i translate movement on the Canvas3D to movement in the virtual 3D world

Posted by Coder on Stack Overflow See other posts from Stack Overflow or by Coder
Published on 2010-05-21T10:37:39Z Indexed on 2010/05/21 10:40 UTC
Read the original article Hit count: 512

Filed under:
|
|
|

My goal is to move a shape in the virtual world in such a way so that it ends up where the mouse pointer is on the canvas.

What i have: -mouse position (x,y) on a Canvas3D object -Point3d object of where a pick ray starting from the Canvas3D viewport intersects with the first scene object. (point in 3D space of where i want to start the drag)

What i want: -Some way to translate the Point3d's coordinates so that the initial point of intersection (the Point3d object) is always overlapping the the mouse position on the canvas (same as when i used the pick ray to determine what the user clicked on from the Canvas3D object).

Thanks!

© Stack Overflow or respective owner

Related posts about java3d

Related posts about translation