How to make the player keep moving to the right through parallax layer mirroring

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ashish

Hi,
I want to make a mobile game where the player keeps moving to the right and finds goodies on the way.

I am able to move the player to the event.position through the InputEventScreenTouch event.
I tried to move the player to the right endlessly through the parallax layer mirroring property. However, in my method even the first mirror image of the Texture (sprite background) does not show up during run time.
I am able to move around the player in the original Texture (sprite background) only.

My Nodes are as below

KinematicBody2D
—Sprite (player)
—Camera2D
------ParallexBackground
-----------ParallexLayer
---------------Sprite background (which I am trying to mirror)

What am I doing wrong?
Is there a requirement to bring in the process function? Or just the input(event) function can do the work?
I am able to move around the player within the original Sprite by the input(event) function alone.

Is there any other way to do this: that is, move a sprite in the mobile game to the right endlessly with a swipe?

Please help.

:bust_in_silhouette: Reply From: 5pectre7

In this type of the game, where the player is continuously moving right or left: it’s not the player that is actually moving - it’s the background that is moving instead, unless you want the player to move off the screen and disappear. The player is only animating to indicate the movement. In games like SMB the Mario char will only move within like 50% of the screen horizontally, and when it reaches the boundaries, the background is scrolling to left or right depending on which side it is. It can be done vertically in the same way.