@Override
    public void setSpatial(Spatial spatial) {
        target = spatial;
        if (spatial == null) {
            return;
        }
        computePosition();
        prevPos = new Vector3f(target.getWorldTranslation());
        cam.setLocation(pos);
    }
Sets the spatial for the camera control, should only be used internally

@param spatial the desired camera target, or null for none
jme3-core/src/main/java/com/jme3/input/ChaseCamera.java