📄 drei/misc/use-camera

File: use-camera.md | Updated: 11/15/2025


title: useCamera sourcecode: src/core/useCamera.tsx

<Grid cols={4}> <li> <Codesandbox id="py4db" /> </li> </Grid>

A hook for the rare case when you are using non-default cameras for heads-up-displays or portals, and you need events/raytracing to function properly (raycasting uses the default camera otherwise).

<mesh raycast={useCamera(customCamera)} />