hi there .i have a problem, i implemented a similar code to helloPhysics. but with diferences.
i proceed to explain my program.
I have a ball that moves around the first person camera, when the mouse is pressed the ball is shooted, then if the ball collide with any object it will return to his original position and then it returns to his original place and continue moves arround the camera, i have attached a terrain the root node.
the problem is, sometime when i press the mouse the ball is not shooted(apparently) and it still rounding the camera, but in reality if it was fired, and this return quickly to his place. this happens because my ball collide with the scene(not the terrain).
i kwnow it beacause i printed the name of the collisioned objects in console.
[java]
if(event.getNodeA()!=null && event.getNodeA().getName().equals(“pelota”)){
ContenedorVariablesGlobales.controladorDeFisica.getControlDeJugador().setPhysicsLocation(new Vector3f(-317.80496f,9.754024f,280.00494f));
ContenedorVariablesGlobales.controladorDeMovimientosJugador.manejarComportamientoDePelota();
System.out.println(event.getNodeB().getName());
}else if(event.getNodeB()!=null && event.getNodeB().getName().equals(“pelota”)){
ContenedorVariablesGlobales.controladorDeFisica.getControlDeJugador().setPhysicsLocation(new Vector3f(-317.80496f,9.754024f,280.00494f));
ContenedorVariablesGlobales.controladorDeMovimientosJugador.manejarComportamientoDePelota();
System.out.println(event.getNodeA().getName());
}[/java]
i dont know why it collide with the scene(visually with nothing).
note: if i dont use a a terrain all work fine.
thanks for any help. and sorry for my bad english.