Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove built-in roll controls #51

Merged
merged 2 commits into from
Feb 12, 2024
Merged

Remove built-in roll controls #51

merged 2 commits into from
Feb 12, 2024

Conversation

Plonq
Copy link
Owner

@Plonq Plonq commented Feb 12, 2024

Closes #48

As explained in #48, having built-in roll controls has issues. First, having keyboard-only controls is ambiguous where there are multiple cameras - which one to control? Secondly, unlike orbit/pan, there are no obvious/intuitive roll controls. Rolling by moving the mouse feels weird, and using keyboard is a bit clunky and not as precise.
Additionally, rolling the camera is most likely a very uncommon use case, because it modifies the up vector which can result in weird perspectives and confusion. It is also practically impossible to get the up vector back to the world 'up' with just the camera controls themselves - you have to manually reset it.

For these reasons, I've decided to remove the built-in roll controls, and let anyone that wants to roll the camera do so if they wish. This puts the responsibility of choosing the control scheme on the user, which makes it more flexible, and it avoids the 'active cam' problem described above because the choice of which camera to control is also up to the user (note: you can choose to use the 'active cam' if you wish and deal with the same issues I described).
The one downside to this is that the touch controls for roll were quite intuitive and there wasn't really anything wrong with them. And re-implementing the touch gestures requires more code than simply checking a key code. But it doesn't make sense to keep the touch controls only.

I have added a roll_axis example to demonstrate how to roll the camera.

@Plonq Plonq merged commit 50c9b1d into master Feb 12, 2024
4 checks passed
@Plonq Plonq deleted the 48-roll-fixes branch February 12, 2024 07:37
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.

Can only roll when mouse inside viewport
1 participant