I am using React Three Fibre, using the Canvas component it sets up a scene and camera with default parameters:
{ fov: 75, near: 0.1, far: 1000, position: [0, 0, 5] }
I want to change the position parameters in particular, I can change the position like so from inside other components:
useThree(({camera}) => {
});
However I want to have some initial position set either by some dedicated camera component or from inside App.jsx
<CanvasContainer>
<Canvas dpr={window.devicePixelRatio}>
<gridHelper args={[200,50]}/>
<axesHelper args={[5]}/>
<Suspense fallback={null}>
<OrbitControls
target0={[0,0,-5]}
enableZoom={true}
enablePan={true}
enableRotate={true}
zoomSpeed={0.6}
panSpeed={0.5}
rotateSpeed={0.4}
/>
<Earth/>
</Suspense>
</Canvas>
</CanvasContainer>
The orbit controls approach isn't working for me either as the z parameter starts out at 5 regardless, instead of -5