The virtual joystick plugin fails when switching from one scene to another.
Ex:
"CursorKeys.js:18 Uncaught TypeError: Cannot read property 'down' of undefined at TouchCursor.shutdown (CursorKeys.js:18)"
This happens because the object inside the for loop is deleted, the file is:
phaser3-rex-plugins/plugins/utils/input/CursorKeys.js:
and this is the "with the error" method:
shutdown(fromScene) {
for (var key in this.cursorKeys) {
this.cursorKeys[key].destroy();
delete this.cursorKeys;
}
}
row 16-21
delete should stay outside the for loop, destroying the cursorKeys object after the individual objects have been destroyed with the destroy method.
to me it should be:
shutdown(fromScene) {
for (var key in this.cursorKeys) {
this.cursorKeys[key].destroy();
}
delete this.cursorKeys;
}
The virtual joystick plugin fails when switching from one scene to another. Ex: "CursorKeys.js:18 Uncaught TypeError: Cannot read property 'down' of undefined at TouchCursor.shutdown (CursorKeys.js:18)"
This happens because the object inside the for loop is deleted, the file is: phaser3-rex-plugins/plugins/utils/input/CursorKeys.js: and this is the "with the error" method:
row 16-21 delete should stay outside the for loop, destroying the cursorKeys object after the individual objects have been destroyed with the destroy method. to me it should be:
I think this is urgent enough, greetings.