@Override
    public float mass(String boneName) {
        float mass;
        if (getSpatial() == null) {
            mass = super.mass(boneName);
        } else if (torsoName.equals(boneName)) {
            PhysicsRigidBody rigidBody = torsoLink.getRigidBody();
            mass = rigidBody.getMass();
        } else if (boneLinks.containsKey(boneName)) {
            BoneLink link = boneLinks.get(boneName);
            PhysicsRigidBody rigidBody = link.getRigidBody();
            mass = rigidBody.getMass();
        } else {
            String msg = "No bone/torso named " + boneName;
            throw new IllegalArgumentException(msg);
        }

        return mass;
    }
Read the mass of the named bone/torso.

@param boneName the name of the bone/torso (not null)
@return the mass (&gt;0) or NaN if undetermined
jme3-jbullet/src/main/java/com/jme3/bullet/animation/DacLinks.java