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

Camera bug #32

Open
pavelvasev opened this issue May 11, 2021 · 0 comments
Open

Camera bug #32

pavelvasev opened this issue May 11, 2021 · 0 comments

Comments

@pavelvasev
Copy link

pavelvasev commented May 11, 2021

Hi Felix!

First of all, thank you very much for your great project! What about the issue, I tried to fix it by myself with PR in mind, but failed to do that. So I just report it to you.

Describe the bug
If to follow example of call to configureControls presented at
https://github.com/felixpalmer/procedural-gl-js/blob/main/src/export/controls.js#L37
we see option value maxPolarAngle: 0.8 * Math.PI.
That's great idea because it allows us for example to look on mountains from below to top.

However, on more-less flat surfaces the camera easily goes below ground level when this maxPolarAngle value is used.
And then, the view sometimes becomes corrupted, with no way to return above ground level.

To Reproduce
Steps to reproduce the behavior:

  1. Use configureControls function with maxPolarAngle: 0.8 * Math.PI option.
  2. Move camera under ground (below ground level) using rotation.
  3. Pan it a little bit (staying below ground).
  4. See no way back for camera to the above ground level ;-)

Screenshot from 2021-05-11 14-37-44

@pavelvasev pavelvasev changed the title Bug in configureControls example Camera bug May 11, 2021
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

No branches or pull requests

1 participant