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…
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)
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!