I've creates small class which you might find useful. It implements
quake-like movement of view. This includes asdw keys for
forward/backward/strafing and mouse freelook. Constant y altitude is
preserved.

Currently there is no smoothing of mouse movement, which results in a
bit jumpy rotations. This class is enough for my experiments, but if
anybody would interested in smoothed version, please contact me - I can
probably do that.

http://thenut.eti.pg.gda.pl/~abies/j3d/FreeLook.java

You use it like this

FreeLook fl = new FreeLook(pCanvas,vp.getViewPlatformTransform());
pCanvas.addMouseMotionListener(fl);
pCanvas.addMouseListener(fl);
pCanvas.addKeyListener(fl);

where pCanvas is Canvas3D and vp is ViewingPlatform. I suppose it could
also work on geometry, but I haven't tried it.

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".

Reply via email to