Jump to content

Multi-touch pointer position issue


BaptisteB
 Share

Recommended Posts

Hi Community !
 
I have an issue getting the position of a pointer.
I'm using in my game 2 pointer, and i need to get position of both, my problem is that when i am trying to get the position of the second pointer down, this position is updated only if the first pointer has been moved.
 
So when i put my first finger on the screen but not moving it, i can't get the position of my second finger when i am moving it.
 

Here is something i put in the game.update() function to detect pointer :

if (this.game.input.pointer2.isDown) {//HERE IF FIRST POINTER HAS NOT MOVED me.game.input.pointer2.position.x AND me.game.input.activePointer.position.x DON'T CHANGE WHEN I AM MOVING MY SECOND FINGER ON THE SCREEN// (it is updated on down but not on move)me.log.text = me.game.input.pointer2.position.x +" "+ me.game.input.activePointer.position.x;}

I also try to use callback but even a moveCallback position is not updated on that particular case.

 

Thanks for your help !

 

Edit : It appears in android browser and cordova app when it use android browser engin.

This is not in fact a phaser problem but a browser one, still the problem remain.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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