Rotating with keyboard
843799Sep 29 2002 — edited Feb 5 2006Hi all,
i'm new to Java 3D, and i've seen several examples of rotating a cube using the mouse (with the MouseRotate object). The thing is that i want to rotate a cube using the keyboard...
Does anyone knows of an example (source code) where i can see a rotation made using keyboard control?
I've tried writing a KeyListener object, and on my KeyListener i tried to rotate using the methods rotX() and rotY(); but it didn't work exactly how i wanted. When i write:
rotX(...);
rotY(...);
only the rotY(...) makes effect; and when i write:
rotY(...);
rotX(...);
only the rotX makes effect. But i want to rotate both at the same time.
Well,
i appreciate any help,
Thanks,
Vic.