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

Virtual JoyStick out of control #208

Closed
x-wk opened this issue Oct 23, 2021 · 3 comments
Closed

Virtual JoyStick out of control #208

x-wk opened this issue Oct 23, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@x-wk
Copy link

x-wk commented Oct 23, 2021

When there are two cameras in the scene and the main camera.zoomTo(1.5), this joystick will jump uncontrollably

      const
         camera2 = this.cameras.add(),
         uiLayer__ = this.add.layer(),
         base = this.add.circle(0, 0, 100).setStrokeStyle(3, 0x0000ff).addToDisplayList(uiLayer__),
         thumb = this.add.circle(0, 0, 60).setStrokeStyle(3, 0x00ff00).addToDisplayList(uiLayer__),
         joyStick = new VirtualJoyStick(this, {
            radius: 100,
            x: 400,
            y: this.scale.height - 400,
            base: base,
            thumb: thumb
         });

      //@ts-ignore
      this.cameras.main.ignore(uiLayer__);
      this.cameras.main.zoomTo(1.5);
@rexrainbow rexrainbow added the bug Something isn't working label Oct 23, 2021
@rexrainbow
Copy link
Owner

rexrainbow commented Oct 25, 2021

Thumb object jumping issue is fixed in latest minify file. See this demo
Will upgrade npm package later.

@rexrainbow
Copy link
Owner

Camera-ignored layer is another issue.

@x-wk
Copy link
Author

x-wk commented Oct 30, 2021

AWESOME

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants