MaterialState materialp = display.getRenderer().createMaterialState();
materialp.setShininess( 128 );
ColorRGBA color = new ColorRGBA( 0.5f, 0.5f, 0.5f, 0.1f );
materialp.setDiffuse( color );
materialp.setAmbient( color.mult( new ColorRGBA( 0.5f, 0.5f, 0.5f, 0.1f ) ) );
planeXY=new Box("planeXY",new Vector3f(0.05f,0,0.05f),0.1f,0.0001f,0.1f);
planeXY.setRenderState(materialp);
MaterialState materialx = display.getRenderer().createMaterialState();
materialx.setShininess( 128 );
color = new ColorRGBA( 1f, 0f, 0f, 0.1f );
materialx.setDiffuse( color );
materialx.setAmbient( color.mult( new ColorRGBA( 1f, 0.1f, 0.1f, 1 ) ) );
axisXArrow=new Arrow("ax",0.1f,0.01f);
axisXArrow.setLocalTranslation(new Vector3f(0.05f,0,0));
axisXArrow.rotateUpTo(new Vector3f(1,0,0));
axisXArrow.setRenderState(materialx);
MaterialState materialy = display.getRenderer().createMaterialState();
materialy.setShininess( 128 );
color = new ColorRGBA( 0f, 1f, 0f, 0.5f );
materialy.setDiffuse( color );
materialy.setAmbient( color.mult( new ColorRGBA( 0.1f, 1f, 0.1f, 0.5f ) ) );
axisYArrow=new Arrow("ay",0.1f,0.01f);
axisYArrow.setLocalTranslation(new Vector3f(0,0.05f,0));
axisYArrow.rotateUpTo(new Vector3f(0,1,0));
axisYArrow.setRenderState(materialy);
MaterialState materialz = display.getRenderer().createMaterialState();
materialz.setShininess( 128 );
color = new ColorRGBA( 0f, 0f, 1f, 0.5f );
materialz.setDiffuse( color );
materialz.setAmbient( color.mult( new ColorRGBA( 0.1f, 0.1f, 1f, 0.5f ) ) );
axisZArrow=new Arrow("az",0.1f,0.01f);
axisZArrow.setLocalTranslation(new Vector3f(0,0,0.05f));
axisZArrow.rotateUpTo(new Vector3f(0,0,1));
axisZArrow.setRenderState(materialz);
camPosBall=new Sphere("cameraPosition",new Vector3f(0,0,0),10,10,0.02f);
axisRoot.attachChild(axisXArrow);
axisRoot.attachChild(axisYArrow);
axisRoot.attachChild(axisZArrow);
axisRoot.attachChild(planeXY);
axisRoot.attachChild(camPosBall);
rootNode.attachChild(axisRoot);
shipNode = getPhysicsSpace().createDynamicNode();
// The ship is represent by filled blok of oak tree wood with dimensions
// 30x12x2 meters (units are lowered by 10000)
((DynamicPhysicsNodeImpl) shipNode).getBody().setMassParameters(4.32f, 0f, 0f, 0f, 532.8f, 3758.4f, 3254.4f, 0, 0, 0);
Box sh = new Box("ship", new Vector3f(0, 0, 0), 15, 1, 6);
//Box sh = new Box("ship", new Vector3f(0, 0, 0), 1, 1, 1);
shipNode.setAffectedByGravity(false); // shipNode.setLocalScale(new
// Vector3f(10,10,10));
shipNode.getLocalTranslation().set(0, 0, 0);