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

Movement of camera ignored during click and drag events #106

Open
richardTingle opened this issue Feb 18, 2022 · 0 comments
Open

Movement of camera ignored during click and drag events #106

richardTingle opened this issue Feb 18, 2022 · 0 comments

Comments

@richardTingle
Copy link

Summary

If the camera moves during a click and drag event on a 3d gui the camera movement is ignored; it behaves as if the mouse hasn't moved at all (which from one perspective it hasn't, but the gui has moved from under it so its pointing at a different point).

Steps to reproduce

  1. Set up a 3d lemur UI as follows
public class Main extends SimpleApplication{

    public static void main(String[] args) {
        AppSettings settings = new AppSettings(true);


        Main app = new Main();
        app.setLostFocusBehavior(LostFocusBehavior.Disabled);
        app.setSettings(settings);
        app.setShowSettings(false);
        app.start();

    }

    @Override
    public void simpleInitApp(){

        GuiGlobals.initialize(this);
        BaseStyles.loadGlassStyle();
        GuiGlobals.getInstance().getStyles().setDefaultStyle("glass");


        Container myWindow = new Container();
        myWindow.setLocalScale(0.1f);
        Label label = new Label("Hello, World.");

        myWindow.addChild(label);

        VersionedList<String> dropDownExamples = new VersionedList<>(List.of("Alpha","Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa"));
        myWindow.addChild(new ListBox<>(dropDownExamples));

    }
    
}
  1. Start the app

  2. Click and hold the scroll bar of the ListBox

  3. While holding click the keyboard down arrow to move the camera

Expected result:

The scroll bar moves with the effective position of the mouse

Actual results:

Nothing happens

Why I care

I realise this may seem a tad pedantic, the reason I care is that I'm moving Tamarin from using its own pick lines and handling click events itself to creating a synthetic viewport and camera at the position of the hand and dispatching mouse events (always claiming the mouse is in the dead centre of the synthetic-viewport). This has immediately solved a bunch of problems and works much better (I guess closer to how Lemur is supposed to work)

So when the hand is clicking and dragging that occurs by the synthetic hand-camera changing its position, but as the steps to reproduce show that kind of gui-moving-under-the-mouse type movement doesn't translate into a click and drag

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