Jump to content

Any way to differentiate between Mouse vs Touch?


clark
 Share

Recommended Posts

I have just an image that follows the mouse basically and at the end of the process I forgot that touch devices do not always generate mouseMoves.  MouseMoves only happen when the pointer is active. 

 

I am sure there is logic in there and a re-write. 

 

However! Just checking, is there any way to do this?

if (this is not a mouse){    //remove from display list}

Thanks!
 

Link to comment
Share on other sites

Man I was looking on the Phaser.Input class!

 

This will suit perfectly for my needs thanks.

 

Just one question though as it will bug me. What happens in the case of a Microsoft Surface for example? Where I guess there could be a mouse plugged in or a touch screen? Maybe this is a question by itself but throwing it out there before marking it solved. Not sure if these are desktops or not and I guess support touch but also could have a mouse too.


 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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