Initializing in this way:
/////
Box b = new Box("box", new Vector3f(), 5,5,5);
b.setModelBound(new BoundingBox());
b.updateModelBound();
Node m_character = new Node("char node");
rootNode.attachChild(m_character);
m_character.attachChild(b);
m_character.updateWorldBound(); // We do this to allow the camera setup access to the world bound in our setup code.
HashMap<String,Object> chaserProps = new HashMap<String, Object>();
chaserProps.put(ChaseCamera.PROP_ENABLESPRING, "true");
chaserProps.put(ChaseCamera.PROP_DAMPINGK, "12.0");
chaserProps.put(ChaseCamera.PROP_SPRINGK, "36.0");
chaserProps.put(ChaseCamera.PROP_MAXDISTANCE, "0");
chaserProps.put(ChaseCamera.PROP_MINDISTANCE, "0");
chaserProps.put(ChaseCamera.PROP_INITIALSPHERECOORDS, new Vector3f(120f, 0f, FastMath.DEG_TO_RAD * 90f));
chaserProps.put(ChaseCamera.PROP_STAYBEHINDTARGET, "false");
chaserProps.put(ChaseCamera.PROP_TARGETOFFSET, new Vector3f(0f, 1.5f, 0f));
chaserProps.put(ThirdPersonMouseLook.PROP_ENABLED, "true");
chaserProps.put(ThirdPersonMouseLook.PROP_MAXASCENT, "" + FastMath.DEG_TO_RAD * 90);
chaserProps.put(ThirdPersonMouseLook.PROP_MINASCENT, "" + FastMath.DEG_TO_RAD * -90);
chaserProps.put(ThirdPersonMouseLook.PROP_INVERTEDY, "true");
chaserProps.put(ThirdPersonMouseLook.PROP_ROTATETARGET, "false");
chaserProps.put(ThirdPersonMouseLook.PROP_MINROLLOUT, "10.0");
chaserProps.put(ThirdPersonMouseLook.PROP_MAXROLLOUT, "2400.0");
chaserProps.put(ThirdPersonMouseLook.PROP_MOUSEXMULT, "1.5");
chaserProps.put(ThirdPersonMouseLook.PROP_MOUSEYMULT, "1.5");
chaserProps.put(ThirdPersonMouseLook.PROP_MOUSEROLLMULT, "25.0");
chaserProps.put(ThirdPersonMouseLook.PROP_LOCKASCENT, "false");
ChaseCamera c1 = new ChaseCamera(DisplaySystem.getDisplaySystem().getRenderer().getCamera(), (Spatial)m_character, chaserProps);
c1.setActionSpeed(1f);
//c1.setTargetOffset(targetOffset);
////
I recieve this error:
Exception in thread "main" java.lang.NoSuchMethodError: com.jme.input.ChaseCamera.<init>(Lcom/jme/renderer/Camera;Lcom/jme/scene/Spatial;Ljava/util/Map;)V
at Test.TestGalaxyViewer.<init>(TestGalaxyViewer.java:90)
at Test.runclass.<init>(runclass.java:41)
at Test.runclass.main(runclass.java:51)
On this line:
ChaseCamera c1 = new ChaseCamera(DisplaySystem.getDisplaySystem().getRenderer().getCamera(), (Spatial)m_character, chaserProps);
What could possibly be the problem here???
EDIT: it seems the hashmap of any kind causes this problem, and it loads without the hashmap