Jump to content

PIXI InteractionData (Global event) weird action


jotaSe
 Share

Recommended Posts

Hi guys!,

 

I need you a little help here, I got a bug with my code getting coordinates

click: function (event) {                var x = event.global.x;                var y = event.global.y;                console.log("x :" + x + " y :" + y);}

If i click just once, it works fine, but if I got click in the same position before, then the coordinates start to change.

 

This is what i get, when I click on the same position :

 

"x :359.2370668348709 y :465.61307901907355"
"x :100 y :84.1747550288076"
"x :14.623619226607044 y :100"
"x :2.189164554881294 y :100"
"x :0.3277192447427087 y :100"

 

Has anyone worked with coordinates?

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