Jump to content

How can I sort a group by scale?


BeachBum
 Share

Recommended Posts

I'm using a particle emitter but it seems the same as group sorting, let me know if I'm wrong on that.

 

I see how to sort a group by x or y but I'm trying to sort by scale like this:

getLargest: function(emitr) {        emitr.sort('scale.x', Phaser.Group.SORT_ASCENDING)        return emitr.getTop();    }

I'm not sure what right is but that is wrong, it throws an error in Phaser.js "Cannot read property 'z' of undefined"

 

Thanks for any help!

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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