ThirdPersonHandler and DynamicPhysicsNode


is it possible to attache a DynamicPhysicsNode to a ThirdPersonHandler so my 'avatar' would have physical behavior?

I tried to, but without success. here is my code:

private void buildPlayer() {
        Box b = new Box("box", new Vector3f(), 1, 1, 1);
        b.setModelBound(new BoundingBox());
        Spatial playerNode = new Node("char node");
        ((Node) playerNode).attachChild(b);

        player = getPhysicsSpace()
        ((DynamicPhysicsNode) player).attachChild(playerNode);
        ((DynamicPhysicsNode) player).generatePhysicsGeometry();


    private void setupChaseCamera() {
        Vector3f targetOffset = new Vector3f();
        targetOffset.y = agl * 1.5f;
        chaser = new ChaseCamera(cam, player);

    private void setupInput() {
        HashMap<String, Object> handlerProps = new HashMap<String, Object>();
        handlerProps.put(ThirdPersonHandler.PROP_DOGRADUAL, "true");
        handlerProps.put(ThirdPersonHandler.PROP_TURNSPEED, ""
                + (1.0f * FastMath.PI));
        handlerProps.put(ThirdPersonHandler.PROP_LOCKBACKWARDS, "false");
        handlerProps.put(ThirdPersonHandler.PROP_CAMERAALIGNEDMOVE, "true");
        input = new ThirdPersonHandler(player, cam, handlerProps);

any hint?

should i use StaticPhysicsNode instead?

In the tutorials there is a simple lesson with a very basic avatar (not sure… Lesson 8 ?). ThirdPersonHandler is not the best thing for controlling a physical avatar, as it changes the position directly. For correct physical behavior you need to apply forces or use powered joints instead.