private void scanSpatial(Spatial model) {
    AnimControl animControl = model.getControl(AnimControl.class);
    Map<Integer, List<Float>> pointsMap = null;
    if (weightThreshold == -1.0f) {
      pointsMap = RagdollUtils.buildPointMap(model);
    }

    skeleton = animControl.getSkeleton();
    skeleton.resetAndUpdate();
    for (int i = 0; i < skeleton.getRoots().length; i++) {
      Bone childBone = skeleton.getRoots()[i];
      if (childBone.getParent() == null) {
        logger.log(Level.INFO, "Found root bone in skeleton {0}", skeleton);
        baseRigidBody =
            new PhysicsRigidBody(new BoxCollisionShape(Vector3f.UNIT_XYZ.mult(0.1f)), 1);
        baseRigidBody.setKinematic(mode == Mode.Kinematic);
        boneRecursion(model, childBone, baseRigidBody, 1, pointsMap);
      }
    }
  }