Fiasco wrote:
>
> I still cant figure this out.
>
> All I want to do is take the drag distance from the mouse and convert it to
> the corresponding 3d world distance. This, of course, would vary depending
> on how far the object your moving is from the screen.
In source code I've pointed to there is a way to create vector from view
to point clicked. If you pick an object, compute distance from viewpoint
to that object. Now when you move the object, compute vector for new
point, multiply it by length and add to viewpoint position. This will
give you absolute position of course, so be vary if there are no
transform above object you want to move.
Or you can do this other way - I suppose it is what you meant. Compute
two points as above and substract one from another - you will get
translation vector. Now add this translation to object in question.
Again, doublecheck transforms - this addition has to be done in absolute
coordinates, without taking rotation/scaling in equation.
Artur
===========================================================================
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".