Vec3f camVect = new Vec3f(cameraTarget[0] - cameraLocation[0], cameraTarget[1] - cameraLocation[1], cameraTarget[2] - cameraLocation[2]);
float diff = camVect.length() - distance;
if (Math.abs(diff) > 1f) {
camVect.normalize();
cameraLocation[0] += camVect.x() * diff;
cameraLocation[1] += camVect.y() * diff;
cameraLocation[2] += camVect.z() * diff;
cameraLocation[2] = Math.max(0.5f, cameraLocation[2]);
engine.getScheduler().requireUpdateVisible();