zodern Posted September 22, 2015 Share Posted September 22, 2015 I have a phaser game with a map made up of sprites that is 4,500 px by 4,500 px. Towns (every 5th sprite) can be clicked. The sprites are 250px square. I use: sprite.inputEnabled = true; sprite.events.onInputUp.add(function() { /* ... */}).bind({town: townId}, this); When the map is dragged, the click targets stay in the same place. If I drag the map up and click where the town moved to won't do anything. Clicking where a town was at will call the click event for that town. How do I make the click targets move with the sprite? Link to comment Share on other sites More sharing options...
zodern Posted September 22, 2015 Author Share Posted September 22, 2015 If it helps, I am moving the camera when dragging. Link to comment Share on other sites More sharing options...
Recommended Posts