Hello
I am trying to do a simple game from a isometric view, but somewhy all the objects seem to disappear after reaching a certain distance from the camera. I have tried to adjust the far-plane on the camera, but it does not seem to
specultaion:
sounds like a bounding volume problem. try updating the bounding volume after attaching to the root node. that way the root node will "notice" the updated model bounds too.
I don't know what it actually is but it is possible that it's a bug as ortho 3d mode is pretty new. Can you make up a short test case that shows the problem?
I'm not entirely sure whether it is in ortho-mode, Renderer.setOrtho() throws com.jme.system.JmeException: Already in Orthographic mode, but on the other hand Renderer.unsetOrtho throws com.jme.system.JmeException: Not in Orthographic mode. Doesn't seem to be any isOrtho() or setProjection() methods.
The camera is set up like this
m_camMain = m_oRenderer.createCamera( m_oRenderer.getWidth(), m_oRenderer.getHeight());
m_camMain.setFrustumPerspective(45.0f,
I got it working by wrapping the camera in a CameraNode. Presumably one shouldn't go on moving the Camera object with it's getLocation() -method.
Now I got another problem with a model loaded from a (Blender exported) XML-file. The model doesn't display at all and doesn't get a BoundingBox (getBoundingVolume returns null). I'm loading the model like this:
XMLtoBinary converter = new XMLtoBinary();
ByteArrayOutputStream byteArrOutStream = new ByteArrayOutputStream();
converter.sendXMLtoBinary(new FileInputStream("red2.xml"), byteArrOutStream);
JmeBinaryReader jbr = new JmeBinaryReader();
Try loading it with TestBinaryXML (one of the standard jme tests) and see if that can handle Your model.
Or try to load the packaged xml scene with Your app.
winkman said:
Try loading it with TestBinaryXML (one of the standard jme tests) and see if that can handle Your model.
Or try to load the packaged xml scene with Your app.
Ah, solved that already. The reason was that it was too small and scaling the object in Blender had no effect. Had to scale the vertices to enlarge it. Also node.setLocalScale() did nothing either.