Jump to content

PIXI Interaction Touch


JECKL
 Share

Recommended Posts

Hi! I am a Korean developer.
I'm making my game engine!

But I have a little problem.

The problem is that I am getting a mouse position using 'render.plugins.interaction.mouse.global'

But on the mobile, the coordinates are returned {x:-999999,y:-9999999}!

So I'm going to create a dummy sprite and use 'pointermove' to get a mouse position, but 'pointermove' doesn't set a position as soon as I click.

That's why I'm trying to use 'pointerdown' and other game objects get in the way!

What should I do?

 

Link to comment
Share on other sites

I think you'll have to look inside "sprite._trackedPointers". 

https://github.com/pixijs/pixi.js/blob/dev/packages/interaction/src/interactiveTarget.js#L105

Just stop inside an event with a breakpoint and look whats inside "_trackedPointers".

I'm not the best person to talk about interaction, I'm calling @themoonrat :)

Link to comment
Share on other sites

  • 1 year later...
On 4/25/2019 at 4:49 PM, ivan.popelyshev said:

I think you'll have to look inside "sprite._trackedPointers". 

https://github.com/pixijs/pixi.js/blob/dev/packages/interaction/src/interactiveTarget.js#L105

Just stop inside an event with a breakpoint and look whats inside "_trackedPointers".

I'm not the best person to talk about interaction, I'm calling @themoonrat :)

page not found

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