asiangoldfish / PlatformerGame

MIT License
0 stars 0 forks source link

Rotating the camera in undocked viewport resets camera rotation #30

Open asiangoldfish opened 4 days ago

asiangoldfish commented 4 days ago

When rotating the camera in the viewport while it is undocked, the camera keeps snapping to its original position. It does not respect the fact that the viewport is undocked. Furthermore, after it is undocked, we can still rotate the camera by interacting with the gray background.

Reproduction steps:

  1. Undock the viewport
  2. Rotate the camera by right clicking and moving the mouse
asiangoldfish commented 4 days ago

The issue is the Editor uses mouse positions within the GLFW window to compute the camera's new orientation. What has to change is to use ImGUI's functions instead.