Silly Question About Coordinates

Up until now I haven't been too concerned with jME's coordinate system as everything I've done has basically been relative to everything else, and so long as those relationships were kept I wasn't concerned if it was x, y, z or positive/negative.



Now, I'm trying to do something a little more precise and I note something that runs contrary to how I thought jME's coordinate system works.



To explain, let's say that I have a camera at 0,25,-25 looking at 0,0,0 (giving one the perspective of having a sheet of paper, so to speak, on a desk in front of you, and looking at its center).  I'm not concerned with the up/down Y axis in this explanation, since it doesn't figure into this question.  Let's say that I want to drop a box into the scene at 15,0,15.  I expect that the coordinates are set up such that if both x and z are positive then the box would appear to the forward right of the center.  However, that is not the case.  It appears to the forward ~left~ of the center.  And, of course, everything else follows this scheme.



Is this normal?  I really don't care in the end, but if I'm sketching something out on graph paper (like an overhead view of a map that I want to use as my low tech world designer ; - ) that I can think in terms of the jME coordinate system.



If this is not normal… then wth?  What controls the coordinate system?




well yes X+ is right X- is left, that's just the way it is :slight_smile:

I assume you're considering 'Forward' as further away from the camera, right?

Normally, a positive Z means (in your case) that it's closer to the camera…



Be sure to take a look at the FAQhttp://www.jmonkeyengine.com/wiki/doku.php?id=the_faq

Q. Why are the X and Z co-ordinates reversed ?
A. You need to turn the camera round 180 degrees:

cam.setAxes(new Vector3f(-1f, 0, 0), new Vector3f(0, 1, 0), new Vector3f(0, 0, -1f));


Yes I think it depends on how your camera is set up. This is the way SimpleGame has it:



        Vector3f loc = new Vector3f( 0.0f, 0.0f, 25.0f );
        Vector3f left = new Vector3f( -1.0f, 0.0f, 0.0f );
        Vector3f up = new Vector3f( 0.0f, 1.0f, 0.0f );
        Vector3f dir = new Vector3f( 0.0f, 0f, -1.0f );



So by default you are looking along -z. Anything you can see with a positive x will be to the right. If you turn around (like by doing lookat 0,0,0 when you're positioned along -z), then anything in that direction with a positive x will appear to the left.

Thanks for the answers!  Order (or at least understanding) has been restored the the universe!