garbo-succus / r3f-control-kit

Composable camera controls for react-three-fiber
20 stars 1 forks source link

Replace <group> with quaternions #6

Open neftaly opened 1 year ago

neftaly commented 1 year ago

At the moment we calculate camera positioning by using a <perspectiveCamera> inside a <group>.

It would be better to use a calculateCameraPosition({ coords, origin }) function that returned { position, rotation }, that we would apply to the perspectiveCamera ref.

neftaly commented 1 year ago

This would also be a useful helper to export (whole library could be used independently of r3f/three)