|
Eric,
By default, RotationInterpolator rotates its target
TransformGroup about the y-axis. To get it to rotate it about the z-axis,
you have to use your Transform3D rot (as axisOfRotation) to swing its
y-axis down into your z--axis. Do this with a rotation of +90
degrees about the x-axis. In your code:
Transform3D rot = new
Transform3D();
rot.rotX(Math.PI/2.0d);
hth,
Fred Klingener
----- Original Message -----
Sent: Saturday, January 05, 2002 4:34
AM
Subject: [JAVA3D] Help.
I've e-mailed this discussion group twice now regarding the
same problem, this will be the third. Please e-mail me back with some sort of
answer so that I might know at least that my messages are being recieved. If
they are, and you mearly don't want to answer my questions, please kindly tell
me to bugger off and I will gladly look for help else where. My problem is
this, I have this really simple SceneGraph that I'm creating using the
tutorial on Sun's web page. In this tutorial they use the Rotation
Interpolator to do a small animation of a color cube rotation around the
y-axis. Now, when I try it all I can get it to do is rotate around the y-axis
or some strange angle that is not what I desired, I want to rotate the cube
around the z-axis. If I simply use a transform group and a "new
Transform3D().rotZ(2.0)" it'll rotate the cube around the z-axis no problem.
But when I use the same Transform3D in the rotationInterpolator it doesn't
work. I've included my code, it's not very long, please I beg you take a quick
glance and tell me what I'm doing wrong. Thank you in advance for any help
anyone can provide.
Eric Berry
|