Jump to content

Starting New Game - How To Get Touch [x,y] On Android?


JeZxLee
 Share

Recommended Posts

Hi,

We finished our 1st PixiJSv4/Audio5js video game (look in my signature).
We are starting a new game project on Monday using our new engine.
Can someone tell us how to get touch [x,y] on Android devices?
We tried to do this already, but never figured it out.
Any help would be appreciated, thanks!

JeZxLee

Link to comment
Share on other sites

8 minutes ago, themoonrat said:

Events on renderer.plugins.interaction cover the whole screen

renderer.plugins.interaction.on( 'pointerdown', () => { console.log('pointerdown') } );

How would I get [x,y] coordinates from above?

Thanks!

JeZxLee

Link to comment
Share on other sites

Sorry, I can't seem to figure this out?

I have:
 

PIXI.Point MouseCoordinates;
renderer.plugins.interaction.on( 'pointerdown', () => { MouseCoordinates = renderer.plugins.interaction.global } );

But it does not work?
Any help would be appreciated, thanks!

JeZxLee

Link to comment
Share on other sites

Hmm, it works for me on both macbook and on iPhone.. If you copy and paste the above into a stock pixi project it doesn't work? Are you on latest Pixi version 4.5.4? Or maybe try to copy and paste it into the basic pixi example?I don't why it wort work for you thou, sorry..

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...