I’ve had a look at this and it seems like they update the projection matrix of the camera. However, the screenToWorld operation requires other properties to be updated such as fov, aspectRatio etc as they are used for the function.
I’ve made a fix in zapparCamera.js here: https://playcanvas.com/editor/scene/1278551
/**
* Override default camera's projection matrix with one provided by Zappar.
*/
const camera = this.entity.camera;
if (camera) {
this.entity.camera.calculateProjection = (mat) => {
mat.copy(projectionMatrix);
const data = projectionMatrix.data;
camera.horizontalFov = false;
camera.fov = (2.0 * Math.atan(1.0 / data[5]) * 180.0) / Math.PI;
camera.aspectRatio = data[5] / data[0];
camera.farClip = data[14] / (data[10] + 1);
camera.nearClip = data[14] / (data[10] - 1);
};
}
Zappar will need to update their integration/example and I will try to contact them about this 