private void reset() {
        // Reset the pickups
        for(Spatial pickUp : pickUps.getChildren()) {
            GhostControl pickUpControl = pickUp.getControl(GhostControl.class);
            if(pickUpControl != null) {
                pickUpControl.setEnabled(true);
            }
            pickUp.setLocalScale(1.0f);
        }
        // Reset the player
        player.setPhysicsLocation(PLAYER_START.clone());
        player.setAngularVelocity(Vector3f.ZERO.clone());
        player.setLinearVelocity(Vector3f.ZERO.clone());
        // Reset the score
        score = 0;
        // Reset the message
        messageText.setLocalScale(0.0f);
    }
Physics based marble game.

@author SkidRunner (Mark E. Picknell)
jme3-examples/src/main/java/jme3test/games/RollingTheMonkey.java