THREE.Raycaster: Unsupported camera type

I am using Combine Camera in THREE.js. Three.js version is 86. I want to drag points on perspective camera side and orthographic camera side. My settings are:

camera = new THREE.CombinedCamera(width / 2, height / 2, 75, 0.1, 10000, -500, 1000);
camera.lookAt(0, 0, 0);
camera.position.x = -30;
camera.position.y = 500;
camera.position.z = 500;
camera.up.set(0, 1, 0);

But, I got this error.

THREE.Raycaster: Unsupported camera type.
setFromCamera @ three.min.js:785
onDocumentMouseMove @ DragControls.js:79

Is there any solution for this problem?

1 Like

CombinedCamera was removed with R88. It was more or less a container entity that internally managed a perspective and orthographic camera. Try to use raycasting with one of the concrete cameras. The properties should be cameraO (orthographic camera) and cameraP (perspective camera).

1 Like