Maybe this code can help, it’s a modified version of the ‘Hello Collision’ tutorial which shows the same stuttering behavior.
[java]
class actionListener(ActionListener):
def init(self, parent):
self.parent = parent
def onAction(self, binding, value, tpf):
if binding == “LMouse”:
if value:
self.parent.mouse_move = True
else:
self.parent.mouse_move = False
class HelloCollision(SimpleApplication):
def simpleInitApp(self):
self.mouse_move = False
self.flyCam.setEnabled(False)
bulletAppState = BulletAppState()
self.stateManager.attach(bulletAppState)
self.viewPort.setBackgroundColor(ColorRGBA(0.7,0.8,1,1))
self.setupKeys()
dl = DirectionalLight()
dl.setColor(ColorRGBA.White)
dl.setDirection(Vector3f(2.8, -2.8, -2.8).normalize())
self.rootNode.addLight(dl)
self.assetManager.registerLocator(“town.zip”, ZipLocator.getName())
sceneModel = self.assetManager.loadModel(“main.scene”)
sceneModel.setLocalScale(2)
self.sceneModel = sceneModel
sceneShape = CollisionShapeFactory.createMeshCompoundShape(sceneModel)
landscape = PhysicsNode(sceneModel, sceneShape, 0)
landscape.attachDebugShape(self.assetManager)
player = PhysicsCharacterNode(CapsuleCollisionShape(1.5, 6, 1), .05)
player.setJumpSpeed(20)
player.setFallSpeed(30)
player.setGravity(30)
player.setLocalTranslation(Vector3f(0, 10, 0))
self.ninja = self.assetManager.loadModel(“Models/Ninja/Ninja.mesh.xml”)
self.ninja.scale(0.05, 0.05, 0.05)
self.ninja.setLocalTranslation(Vector3f(0, -3.0, 0.0))
player.attachChild(self.ninja)
self.rootNode.attachChild(landscape)
self.rootNode.attachChild(player)
bulletAppState.getPhysicsSpace().add(landscape)
bulletAppState.getPhysicsSpace().add(player)
self.player = player
def setupKeys(self):
self.inputManager.addMapping(“LMouse”, [MouseButtonTrigger(MouseInput.BUTTON_LEFT)])
self.inputManager.addListener(actionListener(self), [“LMouse”])
def simpleUpdate(self, tpf):
self.player.setWalkDirection(Vector3f(1,0,0)
def simpleRender(self, rm):
self.cam.lookAt(self.player.getLocalTranslation(),Vector3f.ZERO)
location = self.player.getLocalTranslation()
self.cam.setLocation(Vector3f(
location.x + 30
, location.y + 60
, location.z + 30))
if name == “main”:
a = HelloCollision()
a.start()
[/java]
I posted a thread earlier here about ‘flickering camera’, where I pointed out that a ‘ChaseCamera’ would work. After some ‘better’ investigation however, it turns out that ‘ChaseCamera’ wont work either. 
EDIT: Java version of the above
[java]
import com.jme3.app.SimpleApplication;
import com.jme3.asset.plugins.ZipLocator;
import com.jme3.bullet.BulletAppState;
import com.jme3.bullet.collision.shapes.CapsuleCollisionShape;
import com.jme3.bullet.collision.shapes.CompoundCollisionShape;
import com.jme3.bullet.nodes.PhysicsCharacterNode;
import com.jme3.bullet.nodes.PhysicsNode;
import com.jme3.bullet.util.CollisionShapeFactory;
import com.jme3.light.DirectionalLight;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.scene.Node;
import com.jme3.scene.Spatial;
import com.jme3.input.ChaseCamera;
public class Main extends SimpleApplication {
private BulletAppState bulletAppState;
private Spatial sceneModel;
private PhysicsNode landscape;
private PhysicsCharacterNode player;
private Vector3f walkDirection = new Vector3f();
private boolean left = false, right = false, up = false, down = false;
public static void main(String[] args) {
Main app = new Main();
app.start();
}
public void simpleInitApp() {
/** Set up Physics */
bulletAppState = new BulletAppState();
stateManager.attach(bulletAppState);
flyCam.setEnabled(false);
viewPort.setBackgroundColor(new ColorRGBA(0.7f,0.8f,1f,1f));
DirectionalLight dl = new DirectionalLight();
dl.setColor(ColorRGBA.White.clone().multLocal(2)); // bright white light
dl.setDirection(new Vector3f(2.8f, -2.8f, -2.8f).normalize());
rootNode.addLight(dl);
assetManager.registerLocator(“town.zip”, ZipLocator.class.getName());
sceneModel = assetManager.loadModel(“main.scene”);
sceneModel.setLocalScale(2f);
CompoundCollisionShape sceneShape =
CollisionShapeFactory.createMeshCompoundShape((Node) sceneModel);
landscape = new PhysicsNode(sceneModel, sceneShape, 0);
player = new PhysicsCharacterNode(new CapsuleCollisionShape(1.5f, 6f, 1), .05f);
player.setJumpSpeed(20);
player.setFallSpeed(30);
player.setGravity(30);
player.attachDebugShape(assetManager);
player.setLocalTranslation(new Vector3f(0, 10, 0));
rootNode.attachChild(landscape);
rootNode.attachChild(player);
bulletAppState.getPhysicsSpace().add(landscape);
bulletAppState.getPhysicsSpace().add(player);
ChaseCamera chaseCam = new ChaseCamera(cam, player, inputManager);
player.setWalkDirection(new Vector3f(0.5f,0,0));
}
}
[/java]