glscene / GLScene

GLScene is a graphics engine based on OpenGL with VCL components for Delphi & C++ Builder.
http://www.glscene.org
Mozilla Public License 2.0
216 stars 32 forks source link

Rotation on move around target #8

Closed GrooverMD closed 7 months ago

GrooverMD commented 3 years ago

I'm just wondering why camera move around target can rotate more that 360 degres left and right but only 180 degrees up and down? Is this a OpenGL limitation or a GLScene oversight?

jseling commented 3 years ago

GLScene constraint here: https://github.com/GLScene/GLScene/blob/a08a5ad57e8a1c41273f2578eb7a00b135e18ad6/Source/GLS.Scene.pas#L3340

Because this: https://learnopengl.com/Getting-started/Camera#:~:text=if(pitch%20%3E%2089.0f)%0A%20%20pitch%20%3D%20%2089.0f%3B%0Aif(pitch%20%3C%20-89.0f)%0A%20%20pitch%20%3D%20-89.0f%3B

glscene commented 7 months ago

You can rotate DummyCube around any axes.