Jump to content

Virtual joystick plugin removeStick problem


Amex4152
 Share

Recommended Posts

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

  • 8 months later...

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...