Can I limit the mouse to rotating a scene in only two axes?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Can I limit the mouse to rotating a scene in only two axes?

unixnerd
I'd like the mouse to be able to change the pitch of a scene and rotate the yaw but keep roll fixed at 0. Had a look around OrbitBehaviour and such but can't see anything obvious.

All ideas gratefully accepted :-)
Reply | Threaded
Open this post in threaded view
|

Re: Can I limit the mouse to rotating a scene in only two axes?

basti
Hello unixnerd,

i've made a test scene adjusting some old sample code by Daniel Selman.
It's a bit much to put all in one file and post here, so i zipped it.
MouseRotation.zip

You can rotate the ColorCube with left and right mouse buttons (left=yaw, right=pitch).

hope this helps,
basti
Reply | Threaded
Open this post in threaded view
|

Re: Can I limit the mouse to rotating a scene in only two axes?

unixnerd
That's very helpful, thanks :-)
Reply | Threaded
Open this post in threaded view
|

Re: Can I limit the mouse to rotating a scene in only two axes?

gouessej
Administrator
In reply to this post by basti
Good job basti. That's why I advise Java3D users to come here to post their questions rather than on StackOverflow.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Can I limit the mouse to rotating a scene in only two axes?

basti
@unixnerd
Glad you like it

@gouessej
Wow... Thank You, *blush* just trying to be helpful :)