hi everyone
when i try to set scroll for my items, i see the images are scrolled but their physics, that are a square of lines, just moving and scrolling by their role
this is my code
let graphic = this.physics.add.image(portal_info.asset.x, portal_info.asset.y + 300, "course_back_logo");
graphic.setScrollFactor(this.o.config.bg.scroll.x, this.o.config.bg.scroll.y)
graphic.body.allowGravity = false
graphic.info = g_info
this.o.player.on("overlapstart", function () {
this.body.debugBodyColor = 0xff3300;
console.log("overlapstart");
console.time("overlap");
});
this.o.player.on("overlapend", function () {
this.body.debugBodyColor = 0x00ff33;
console.log("overlapend");
console.timeEnd("overlap");
});
this.physics.add.overlap(this.o.player, graphic, (p, g) => {
console.log(g)
this.o.reach_target = { type: "game", info: g.info }
});
this.o.platform_garphics.push(graphic)
attention, this code in the loop
thank you