[SOLVED] Mouse isPressed and wasPressed

Well, you can easily use it in your update method by assigning it in a script property like this:

this.app.mouse.on(pc.EVENT_MOUSEUP, function(event){

   if (event.button === pc.MOUSEBUTTON_LEFT) {
      this.mouseLeftReleased = true;
   }

}, this);

And make sure to clear it at the end of your update loop:

MyScript.prototype.update = function(dt){

   // update loop end
   this.mouseLeftReleased = false;
};
1 Like