Sprites losing interactivity with tilemap game

Hello phaser’s guys,

I’m stuck with a strange problem :
I have a “button/sprite” with interactivity which is nested in a container :
const a = sena.add.sprite(0,100, ‘but’); a.setInteractive();
myCont.add(a); myCont.setScrollFactor(0)

this container appears in a tilemap’s game at some moments.
When the game initializes, sprite has interactivity.
but as soon as the map (bigger than the scene) moves (adjusting to player’s move) my sprite’s button lost interactivity. I think the problem is due to “tilemap logic”, but can’t find the solution…

any help would be appreciated!

Could it be that the sprite still scrolls? Turn debug mode to true in your game config.

Thanks for your answer. On this screenshot below, interactivity works (yes/no button) but if the player walks a little (“making tilemap moving”), button is still showing but loses interactivity)

I tried to follow your advice but debugging doesn’t seem to work with physics : it shows nothing.(http://www.html5gamedevs.com/topic/38408-phaser-3-debug-property-in-physics-not-drawing-debug-layer/)

It seems there are these kinds of problems when setScrollFactor() is applied to several object (in my case the player and the container). To solve the problem, I had to remove setScrollFactor() method from the container containing my interactive sprites and replace it with a workaround (adjusting container coordonnates from player one’s). If someone has the explanation I am curious to know the reason!