Lomaz Posted January 23, 2016 Share Posted January 23, 2016 Hello! So I've had this problem for a while, basically for about 70 frames after the canvas is shown the mouse point as around {x: 344, y: 614.5} before snapping it to its proper location, regardless, this is really a larger problem then it sounds like.. any way to have it correctly detect the position sooner? not sure how to fix this! One of the first lines on update is: var pointer = this.game.input.activePointer; Thanks! Link to comment Share on other sites More sharing options...
Lomaz Posted January 23, 2016 Author Share Posted January 23, 2016 Found an oddly easy fix for it! nevermind! EDIT - Still broken =/ 00] before [2:00] if(($('#main-mapContainer').hasClass('hiddenMap') != true)){ if($('#main-mapContainer').is(":focus")){ $('#main-mapContainer').blur(); } player.body.setZeroVelocity(); active = true; if(reload == false && (!$("#chatInput").is(":focus"))){ ping++; player.body.mass = 100; var pointer = this.game.input.activePointer; pointer.dirty = true; [2:00] after [2:00] var pointer = this.game.input.activePointer; if(($('#main-mapContainer').hasClass('hiddenMap') != true)){ if($('#main-mapContainer').is(":focus")){ $('#main-mapContainer').blur(); } player.body.setZeroVelocity(); active = true; if(reload == false && (!$("#chatInput").is(":focus"))){ ping++; player.body.mass = 100; pointer.dirty = true; Link to comment Share on other sites More sharing options...
Recommended Posts