Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.