Hi all, running into a weird issue here that I’m not sure how to resolve.
Preview deployment with issue here: https://com-ff3lautw9-johnjackbogarts-projects.vercel.app/
Actual deployment: johnjackbogart.com
Commit: GitHub - Johnjackbogart/com at f5cb1a9ab2c4fc570631416409276cfee2e11942
The issue I am running into:
- When window is resized, or if you scroll past the bottom (on mobile), the animation I have built breaks because the camera is no longer looking at the right place. Normally, the camera zooms in on the scene as the user scrolls and some of the other objects get animated as the camera zooms in. After a resize, the camera doesn’t zoom in on the scene anymore, it performs the same zooming function but the whole scene seems out of orientation
- The camera easing function still logs the correct coordinates for the camera, as well as the same camera orientation
- None of the objects in the scene’s change location
- Issue is resolved when the pages props of scroll controls is set to 1
- Anything more than 1 page, and the above activity is shown
Hard to explain. I can put the scene in a codebox if it is needed. But you can see the issue with the above url and the repo is available on github. I think it is an issue with scroll controls, but not sure how to resolve this one