rexrainbow / phaser3-rex-notes

Notes of phaser3 engine
MIT License
1.18k stars 260 forks source link

Wrong touch with Virtual Joystick using the camera (PHASER 3) #399

Closed convitesamigo closed 5 months ago

convitesamigo commented 5 months ago

Hello! I'm using phaser 3.70.0 together with its VIRTUAL JOYSTICK plugin.

The Virtual JoyStick works perfectly as long as I'm within the limits (W: 0-600px and H: 0-800px).

But when the player leaves this limit and the camera starts following him, the joystick's drag button starts to behave wrongly. You can't drag it anywhere, it goes to a random position.

rexrainbow commented 5 months ago

Please provide a simplest, runnable test code for demonstrate this use-case.

convitesamigo commented 5 months ago

Please provide a simplest, runnable test code for demonstrate this use-case.

https://convitesamigo.github.io/vjoystick/

rexrainbow commented 5 months ago

I replace the plugin file on your repo by my latest version of plugin. It works fine. Live demo

Might try to use latest version of rexvirtualjoystickplugin

convitesamigo commented 5 months ago

Very good, problem solved! Worked perfectly. Now I can finish my multiplayer game. Thank you very much!