How to Settup Camera to transform 1 unit to 1 pixel

Hello,
I am new to BabylonJs and I’m moving from three.js. I wan to set the camera position to transform 1 unit to 1 pixel

This is what’s I am using in THREE

const perspective = 800
initCamera() {
	const fov = (180 * (2 * Math.atan(window.innerHeight / 2 / perspective))) / Math.PI

	this.camera = new THREE.PerspectiveCamera(fov, window.innerWidth / window.innerHeight, 1, 1000)
	this.camera.position.set(0, 0, perspective)
}

Thank you in advance.

Is the same fov not working on let say an ArcRotateCamera in babylon js ??? You could try it easily in the playground ? Cameras | Babylon.js Documentation

Thank you for your reply.

ORTHOGRAPHIC Camera is the solution to my issue

.

1 Like