Picking with an Absolute mouse

i dunno if this is relevant or not, but il say it anyway. the getScreenCoordinates returns a value if the worldCoordinate is at z=0. This is very limiting especially if you have a big scene to manage. And the lenseflare effect will not be the same.



Is there a way of getting the screen coordinates with the z not being 0?

I personally thought you would get the same screen coordinates whetether you take the z=0 or z=1. I could be wrong though, never tested really big scenes.



By the way, still getting the Intbuffer error…

By the way, still getting the Intbuffer error...


Can you post a stack trace?

Was too fast with changing. I’m now using a self-made array (just like the modelview / projection matrices).



Stacktrace in a minute


java.lang.UnsupportedOperationException
   at java.nio.IntBuffer.array(IntBuffer.java:903)
   at com.jme.system.lwjgl.LWJGLDisplaySystem.getWorldCoordinates(LWJGLDisplaySystem.java:366)
   at oglUI.managers.HUD.MiniMap.<init>(MiniMap.java:54)
   at oglUI.managers.GameHud.<init>(GameHud.java:60)
   at oglUI.managers.gameEngine.<init>(gameEngine.java:97)

Whoops, there were two .array calls. Replaced and checked in. Try that.

Working now, but getting some bogus information ( x, y remain at 0,0 when I point the mouse at 100,600).



snip Gonna test some more to test both functions, i’ll keep you updated.

Working now, but getting some bogus information ( x, y remain at 0,0 when I point the mouse at 100,600).


Shoot, I really don't know. Renanse? Help! XD

Maybe you know an easier way for this: I'm trying to create a minimap in the lower right corner. As far as I know I cannot use the ortographic mode directly with jme, which would be the easiest way.


This has come up a few times now, and needs to be resolved, I'm considering two methods for entering orthogonal and exiting orthogonal mode. These would be in the Renderer class.

Hmm, would be great if we had some test code to play with. Could you post your code or a link to it, Marius?

BTW, I updated renderer. You can now call setOrtho to set the screen into ortho mode, and unset to… well… unset it. This is very experimental, so I’m not sure if this is how it will stay. But give it a shot and see what happens. :slight_smile:

Well, yes. But it’s not really a small example…more like a full game with network support.



I could release the code but you would need a server to connect on though.



I’ll try to create a package for you guys tomorrow, shouldn’t be that hard to do :slight_smile:

Speaking as someone who wants to develop an RPG ala MM6-8, I’d love to see someone provide a comprehensive example showing how to mix terrain, widget viewports, objects, skydome/skybox, absolute mouse picking, etc.



So far, I have mangled together something that supports terrains, viewports and objects. I’m willing to make what I have available, but I doubt it provides a “best practices” way of doing things.



-Mike

Im more then willing to provide our code then. We are running against some serious problems right now. Not only the 3d factor but also the networking part.



The game will become a fast-paced space shooter a la "netrek". Right now the biggest part is even outside jme and maintains all of our objects and the network part.



If someone provides us with a running server ( a small process ) to accept players and testers everyone can change and test what they want.



Ill get the code up by tomorrow, some screenshots are already here: http://www.ziso.net/test/

I probably can help to throw together a simple server, depending on what you’re doing. That’s my area of specialty, unlike graphics :slight_smile:



-Mike

Well, the java server is done, it’s nothing more then a simple bouncer. We do need an server to host it on with a free port. If you could manage to provide that we are ready to go :slight_smile:

Looks very cool Marius, I’d love to put up stuff like this on the apps and utils page. :slight_smile:

Hey Marius, are you using particles for the stars? Nice shots.

hehe, I believe the stars you mention are actually missiles :stuck_out_tongue:

Heh, oh… Are they particles though? Looks like you are using star.png

yeah, they are particles and we do use star.png at this point :slight_smile:

Cool, I suggest not using the 8KB star.png file as it’s pretty slow.