jotaSe Posted April 13, 2014 Share Posted April 13, 2014 Hi guys!, I need you a little help here, I got a bug with my code getting coordinatesclick: 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? Quote Link to comment Share on other sites More sharing options...
enpu Posted April 13, 2014 Share Posted April 13, 2014 That's weird. Do you have that click event on sprite or stage?What Panda version are you using? (type game.version to console)Can i see your full code? Quote Link to comment Share on other sites More sharing options...
jotaSe Posted April 13, 2014 Author Share Posted April 13, 2014 Hi enpu, I'm using 1.3.2 and basically, that's all the code, I'm just make some testing, I extracted the function to a new Scene to check what's wrong, the event is for a stage (game.scene) Quote Link to comment Share on other sites More sharing options...
enpu Posted April 13, 2014 Share Posted April 13, 2014 What OS and browser are you using? Quote Link to comment Share on other sites More sharing options...
jotaSe Posted April 13, 2014 Author Share Posted April 13, 2014 Win8/Firefox, because you ask me that, I tested on chrome, and works fine, the bug it's using firefox, any idea to solve that? Quote Link to comment Share on other sites More sharing options...
enpu Posted April 13, 2014 Share Posted April 13, 2014 I just tried on Windows 8 and Firefox 28, got no issues. Quote Link to comment Share on other sites More sharing options...
jotaSe Posted April 13, 2014 Author Share Posted April 13, 2014 That's weird, without any refactoring, I just tested on chrome and it worked, then I tested again with firefox, but i just disabled the plugins, and now it's working. The problem was a plugin on the browser, I'm sorry for the waste of time, thx a lot 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.