Set the camera rotation at start #642
happylifes0031
started this conversation in
General
Replies: 1 comment
-
I believe you can use the <Canvas
onCreated={({camera}) => {
// do things here
}}
/> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I have been trying to rotate the camera at 'init' within the useEffect, whatever I try or do, it won't work. Unless I put it in a useFrame, but i dont want the update every frame, just rotate the camera at start. What am I doing wrong or is there another way?
`const Dolly = ({setSceneCamera, setThisScene}) => {
const {camera, scene} = useThree()
const [x, y, z] = config.camera.startPosition;
}`
Thank you for your time!
Beta Was this translation helpful? Give feedback.
All reactions