How can i rotate images in an image carousel that are close to the current position of the camera

Hey Community,

i am trying to build an image carousel based on this example of three js fiber:

https://codesandbox.io/p/sandbox/dc5fjy

I switched the scroll controls against orbit controls so that the user can freely move the camra around. Here is the link to that version:

https://codesandbox.io/p/sandbox/carousel-rvnvvp?workspaceId=fd116b00-6904-431c-9622-463c6daa148d

I want to rotate image cards that are close to the camera towards it, but failed to achive it. I tried to use the current cameras position to do some calculations, but i never found a solution that worked for the whole circle.

Any help is much appreciated :slight_smile: