Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Rotating with keyboard

843799Sep 29 2002 — edited Feb 5 2006
Hi 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 5 2006
Added on Sep 29 2002
4 comments
146 views