Hi!
I need to control my basketball players using mouse, and I found that RelativeMouse is what I
OK, I fixed the second part, overiding "NodeHandler" class to disable the mouse part, and mantaing control over my camera with keyboard.
The other problem remains, I must click my applet canvas in order to move my characters.
Please help!
One of those known hassles of Applets…they have to be given control.
I think with JavaScript you can request focus on the applet, but it's been a long time since I've been down that road.
OK, great, I'll try that. Right now I'm running this applet using the applet viewer, (not inside a HTML page). Maybe it is the same bug, I'll try it inside a HTML using JAVASCRIPT to request focus.
Many thanks!
darkfrog said:
One of those known hassles of Applets....they have to be given control. ;)
I think with JavaScript you can request focus on the applet, but it's been a long time since I've been down that road.
Tried that, no luck still :(
<html>
<body>
<h1>Basket 3D</h1>
<center>
<applet id=idApplet
code="uy.edu.uas.basket3d.Basquet3D"
archive="lwjgl.jar,natives.jar,lwjgl_applet.jar,lwjgl_util_applet.jar,jme-terrain.jar,jme-sound.jar,jme-scene.jar,jme-awt.jar,jme.jar,basket3d.jar"
width="1024"
height="768">
<param name="useAppletCanvasSize" value="true"/>
</applet>
</center>
<script type="text/javascript">
obj = document.getElementById("idApplet");
obj.focus();
</script>
</body>
</html>
Need some help please!
darkfrog said:
http://forum.java.sun.com/thread.jspa?threadID=361104&messageID=1529337
Unfortunatelly that solution does not work here. :(
Got it!
This line at SimpleJMEApplet was my problem:
((AWTMouseInput) MouseInput.get()).setDragOnly(true);
hehe, oops. :-p