Amex4152 Posted March 16, 2016 Share Posted March 16, 2016 Hi, I purchased the joystick plugin and works fine most of the time, but I have an issue and can´t figure out what's wrong, so, I was wondering if it's an issue: - Using Phaser 2.4.6 and last version of Virtual Joystick Plugin - Using stick.showOnTouch = true; Problem: when changing state, if the stick is keep pressed, trying to use either: stick.destroy(); or pad.removeStick(stick); Throws the error: phaser-virtual-joystick.js:1042 Uncaught TypeError: Cannot read property 'length' of null This seems to happen once the stick is removed... Please let me know your comments. Thanks in advance. Link to comment Share on other sites More sharing options...
Amex4152 Posted March 16, 2016 Author Share Posted March 16, 2016 Found the answer, I had to removeStick() on State.shutdown() erj1 1 Link to comment Share on other sites More sharing options...
erj1 Posted December 6, 2016 Share Posted December 6, 2016 Your answer fixed my issues with restarting my state and using the Virtual Joystick Plugin. However, I am just curious as to how you figured this out. Was it in the documentation somewhere and I just missed it? Link to comment Share on other sites More sharing options...
Recommended Posts