sorry, this is only a general hint. i think, i want to move an object in the xy-plane of your screen. you don't need your mouse coords in vworld. then you have perform a coordinate transformation from the coord system of the object you want to be dragged into the coord system of your viewpoint. Then apply your dragging transformation and transform it back into its former coord system. all transformations can be done in 1 step by multiplying them from left to right. Gernot [EMAIL PROTECTED] > -----Original Message----- > From: James Harrison [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 28, 1999 4:55 PM > To: [EMAIL PROTECTED] > Subject: [JAVA3D] Dragging an object > > > I want to drag an object across the screen. So I thought this > would work > > . > . > . > x = ((MouseEvent)event[i]).getX(); > y = ((MouseEvent)event[i]).getY(); > > Point3d position = new Point3d(); > > canvas3D.getPixelLocationInImagePlate(x, y, position); > Transform3D imagePlateToVworld = new > Transform3D(); > > canvas3D.getImagePlateToVworld(imagePlateToVworld); > imagePlateToVworld.transform(position); > > transformGroup.getTransform(transformX); > > Transform3D translationDelta = new > Transform3D(); > > Vector3f translation = new Vector3f(); > translation.x = position.x-x_last; > translation.y = position.y-y_last; > transDelta.set(translation); > > x_last = position.x; > y_last = position.y; > > transformX.mul(viewPlaneTransform); > transformX.mul(translationDelta); > transformX.mul(viewPlaneTransformInverted); > transformGroup.setTransform(transformX); > > The final transform is close, but no cigar if there is a > rotation in the > viewPlane transform. > > I would appreciate any help on this. > > Jim > > ============================================================== > ============= > To unsubscribe, send email to [EMAIL PROTECTED] and > include in the body > of the message "signoff JAVA3D-INTEREST". For general help, > send email to > [EMAIL PROTECTED] and include in the body of the message "help". > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".