Hi,
I have a problem with SwingGUI and JMECanvas event handling. (similar to /jmetest/util/JMESwingTest.java)
I use a chaseCamera for navigation on a sphere surface around my model. This works fine for mouse.
But there is a problem with keyboard events, and i solved this like discussed in this thread:
http://www.jmonkeyengine.com/jmeforum/index.php?topic=7248.msg63929#msg63929
Here is my application as one-jar:
http://knecht.homelinux.net/ftp/ftp2/knecht/swarms_20080626_1057.jar
run with: (tested on linux and windows)
java -jar swarms_20080626_1057.jar
With left mousebutton pressed over the 3DCanvas you can navigate the scene, mouseWheel ist radius.
I now have a ChaseCamera which work with mouse, and a external event method that is triggered when a keyboard key is pressed. OK, so far so good.
What i want is to navigate in the same way like the mouse, but with keyboard keys. (Button w=get up,a=left,d=right,s=down, radius with +/- keys).
My question is, what is the best approach to do this ? generate and throw mouse events in some way ? make my own ThirdPersonMouseLook class with public rotateRight, rotateUp methods ?
i am not shure how to solve this problem, and have no idea how to come closer to an solution. Can anybody give me some hint what is a good way to solve this problem ?
thanks
Sebastian
PS: please report me if my one-jar build is not running on your os, it should be run with linux, win and mac.