Allow right-click drag in viewport (for plugin GUI)

Currently, if you right-click and drag in the viewport the mouse position gets locked in place and the camera begins to rotate. This prevents plugin GUIs in game.CoreGui from having right click drag functionality (as the mouse can’t move when right mouse button is down). I haven’t found a way around this yet, and it restricts my plugin to only working in a widget frame. The reason I want it to work in both widget windows and the main viewport is because the main viewport is usually larger and more comfortable to work in on smaller screens.

Possible solutions:

  • Prevent mouse lock and camera rotate if right-clicking over a GUI element (maybe only in new “CoreGui” type object for plugin GUIs)
  • Allow control over studio camera controls to temporarily disable them
2 Likes