JECKL Posted April 25, 2019 Share Posted April 25, 2019 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? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 25, 2019 Share Posted April 25, 2019 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 Quote Link to comment Share on other sites More sharing options...
themoonrat Posted April 25, 2019 Share Posted April 25, 2019 You rang, m'lord? @JECKL try looking at `renderer.plugins.interaction.eventData.data.global` instead JECKL and ivan.popelyshev 2 Quote Link to comment Share on other sites More sharing options...
JECKL Posted April 26, 2019 Author Share Posted April 26, 2019 @themoonratPerfect!!! Very Very Thank you! I solved the problem!! @ivan.popelyshev Thank you so much for trying to help me! ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
josprachi Posted March 7, 2021 Share Posted March 7, 2021 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.