Skip to content

fix grounded skybox rotation#4752

Merged
elalish merged 1 commit into
masterfrom
skyboxRotation
Apr 15, 2024
Merged

fix grounded skybox rotation#4752
elalish merged 1 commit into
masterfrom
skyboxRotation

Conversation

@elalish

@elalish elalish commented Apr 15, 2024

Copy link
Copy Markdown
Contributor

Unlike the normal skybox, the grounded skybox was rotating with the model during auto-rotate, which is inconsistent and caused the background to be not in the same place as the applied environment lighting, since that was correctly not rotating.

This now means the model moves relative to the ground when panning or changing the turntable rotation. I don't totally love that, but it's the only way to be consistent with our existing API.

@elalish elalish self-assigned this Apr 15, 2024
@elalish elalish merged commit 69d3689 into master Apr 15, 2024
@elalish elalish deleted the skyboxRotation branch April 15, 2024 22:40
@ArchieBattley

Copy link
Copy Markdown

I understand why this had to be done to keep consistency. However, in the future will the auto-rotate and pan functions be separated. eg. could there be an option to stick the model to the ground plane when panning? Or would it involve a rewrite of the current camera functionality.

@elalish

elalish commented Apr 19, 2024

Copy link
Copy Markdown
Contributor Author

The real problem is that pan operates by affecting camera-target - which is what makes pan emulatable via JS. That's an important feature, but camera-target is about centering the object as well, which should certainly keep the skybox centered. I'm somewhat regretting now that these things are so linked, but this also only affects a pretty narrow use case. I think I'm going to leave it as is.

JL-Vidinoti pushed a commit to vidinoti/model-viewer that referenced this pull request Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants