"Animate Camera around Scene" vs "Animate Scene around Camera"

While looking at many react-three-fiber and react-three-flex examples, I noticed that 100% of them were animating the objects of the scene around the camera, instead of the camera around the scene; For example, Example, many of the parallax examples use clever math lerp calculations to create a nice parallax effect where objects in the foreground pan across the camera faster than objects positioned in the background. When the page scrolls, the content moves according to the content ratios and viewport size. While attempting to try this on my own, I asked myself, what’s stopping me from just animating the camera instead? The camera would simply pan across and down the page when the pages scrollTop changes. Theoretically, you could get the same result, right? But would it be easier? If anyone has any opinions or answers to why this is the case, I would be interested in reading why. :thinking:

Here’s another example: example

Thanks!

I think it’s completely up to the developer to decide which way to pick. In both examples it seems like while background is sliding down, the content is sliding upwards, so it kind of make sense to keep the camera stationary and let these two layers move. However in another way, you can keep the background stationary, move the camera down and move the content up then it would look the same. Computation wise, if the Groups that has background and content elements have many pieces, chancing all their transforms are more expensive then just changing camera’s transform. But the difference would again depend how complex they are.

I was looking for something a little less obvious other than the possible performance gains.