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

Add ability to control camera manually (e.g. with keyboard) #11

Merged
merged 10 commits into from
Apr 29, 2023

Conversation

Plonq
Copy link
Owner

@Plonq Plonq commented Apr 29, 2023

Some of this was already possible, but there were a couple issues:

  • Constraints (upside down, and min/max alpha/beta) only applied to mouse input. Fixed by always applying these constraints.
  • Modifying radius on its own didn't do anything. Fixed by adding a force_update option which forces recalculation of rotation and translation. This also technically applied to the focus, but since you only notice where the focus is when you rotate, it didn't make any difference.
  • It wasn't possible to zoom orthographic cameras by setting radius, so I had to change it so the orthographic projection's scale is based off the radius.

Adds keyboard control example.

@Plonq Plonq merged commit 60d0acf into master Apr 29, 2023
@Plonq Plonq deleted the kb-controls branch April 29, 2023 03:41
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.

1 participant