Can't handle pointer events with a non-default camera
See original GitHub issueI’m still trying to grasp all of the different hooks in this package so maybe this is a misunderstanding rather than a technical limitation, but here’s the overview:
I have a custom orthographic camera. The default one (or setting it as the default) doesn’t suit my needs because I can’t seem to get a hook that executes after the defaults are applied in order to override the frustum. I understand that not using the default camera means that I can’t rely on the default raycaster and therefore intersection handling code. Before switching to react-three-fiber I had implemented my own handlers for this so it’s not too much trouble.
Unfortunately, I can’t apply them because I would need to attach handlers for these DOM events outside of the Canvas component while also referencing the camera which is inside Canvas (to make use of useThree).
Is there something I’m missing? The Canvas props let me pass arguments to the raycaster but they would just get overridden using the default camera when handling an event.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (4 by maintainers)

Top Related StackOverflow Question
This would currently exist as
camera.manual–<Canvas camera={{ manual: true }} />or writing to themanualproperty of an external camera instance.added a new flag: Canvas.updateDefaultCamera (true by default). if you switch this off it won’t adjust the camera on size changes.