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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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