When physics go wild

Hi, im developing a bowling game and im stuck with the physics.

Im required (by the teachers) to use X3D format, so I've manage to add metalanguage in there to describe the physics… Running some basics test ive noticed some weird behaviours so I decided to Just test the physiscs and emulate my loader, here is the code. If you can run this you will notice that the cylinder start jumping around. Sometimes if the mood is right it evens passes throuhg the floor.

package physics;

import com.jme.bounding.BoundingBox;
import com.jme.input.KeyBindingManager;
import com.jme.input.KeyInput;
import com.jme.math.Vector3f;
import com.jme.scene.Node;
import com.jme.scene.Spatial;
import com.jmex.game.StandardGame;
import com.jmex.game.state.BasicGameState;
import com.jmex.game.state.DebugGameState;
import com.jmex.game.state.GameStateManager;
import com.jmex.physics.DynamicPhysicsNode;
import com.jmex.physics.PhysicsDebugger;
import com.jmex.physics.StaticPhysicsNode;
import com.jmex.physics.geometry.PhysicsBox;
import com.jmex.physics.geometry.PhysicsCylinder;
import com.jmex.physics.material.Material;
import com.jmex.physics.util.states.PhysicsGameState;

public class TestPhysicsRaw {
   public static StandardGame game;// = new StandardGame("Test2");
   public static PhysicsGameState physicsGameState;// = new PhysicsGameState("Physics");

   public static void main(String[] args) {
      try {
         game = new StandardGame("Test2");
         BasicGameState state = new MiGameState2();
         physicsGameState = new PausedPhysics2("Physics");
         Spatial sp = createPhysics();
      } catch (Exception e) {
         // TODO Auto-generated catch block

   private static Spatial createPhysics() {
      Node ans = new Node();
      ans.setModelBound(new BoundingBox());
      return ans;

   private static Spatial createFloor() {
      StaticPhysicsNode group = physicsGameState.getPhysicsSpace().createStaticNode();
      PhysicsBox bx = group.createBox("box1");
      Vector3f box_extent = new Vector3f(25.417055f, 30.045217f, 0.247226f);
      bx.setLocalTranslation(new Vector3f(0, 0, 0));
      group.setLocalTranslation(new Vector3f(0.325375f, -0.161774f, 4.989698f));
                new Vector3f(-1.000000f, 0.000000f, 0.000000f));

      return group;

   private static Spatial createBoxPin() {
      Node trans = new Node();
      DynamicPhysicsNode group = physicsGameState.getPhysicsSpace().createDynamicNode();
      PhysicsBox bx = group.createBox("box1");
      Vector3f box_extent = new Vector3f(0.12803f, 0.128031f, 0.368542f);
      bx.setLocalTranslation(new Vector3f(0.0f, 0.0f, 0.184271f));
      trans.setLocalTranslation(new Vector3f(0.412552f, -0.000000f, -8.502293f));
                   new Vector3f(-1.000000f, 0.000000f, 0.000000f));
      return trans;

   private static Spatial createCylinderPin() {
      DynamicPhysicsNode group = physicsGameState.getPhysicsSpace().createDynamicNode();
      PhysicsCylinder cy = group.createCylinder("cyl1");
      Vector3f cy_extent = new Vector3f(0.12803f, 0.128031f, 0.368542f);
      cy.setLocalTranslation(new Vector3f(0.0f, 0.0f, 0.184271f));
      group.setLocalTranslation(new Vector3f(0.412552f, 0.100000f, -6.302293f));
                new Vector3f(-1.000000f, 0.000000f, 0.000000f));

      return group;


class PausedPhysics2 extends PhysicsGameState {
   private boolean paused = true;
   public PausedPhysics2(String name) {
        /** Assign key P to action "toggle_pause". */
   public void update(float arg0) {
      // TODO Auto-generated method stub
      boolean doOneFrame;
        if (KeyBindingManager.getKeyBindingManager().isValidCommand(
                "ptoggle_pause", false)) {
            paused = !paused;
        doOneFrame = KeyBindingManager.getKeyBindingManager().isValidCommand("oneframe", false);
        if (doOneFrame)
        // Si un objeto est

Ok, Im on my office right now (using windows) and that same example works flawesly. :S

maybe your other machine is slower and can't keep up with the physics updates or something along these lines.

That would explain passing through walls… but anyway thats not the case, my machine is way better than the toaster I have at work.

When I get back home I'm going to try recompiling odejava from source and removing the dust on my windows partition.

Anyways asking around a couple of college friends I found that other group is having strange behaviour with linux too.