diff --git a/photon-lib/src/main/java/org/photonvision/simulation/SimCameraProperties.java b/photon-lib/src/main/java/org/photonvision/simulation/SimCameraProperties.java index 592e206c61..f34935e1a2 100644 --- a/photon-lib/src/main/java/org/photonvision/simulation/SimCameraProperties.java +++ b/photon-lib/src/main/java/org/photonvision/simulation/SimCameraProperties.java @@ -176,8 +176,8 @@ public void setCalibration(int resWidth, int resHeight, Rotation2d fovDiag) { var distCoeff = VecBuilder.fill(0, 0, 0, 0, 0); // assume centered principal point (pixels) - double cx = resWidth / 2.0; - double cy = resHeight / 2.0; + double cx = resWidth / 2.0 - 0.5; + double cy = resHeight / 2.0 - 0.5; // use given fov to determine focal point (pixels) double fx = cx / Math.tan(fovWidth.getRadians() / 2.0);