Attention | Topic was automatically imported from the old Question2Answer platform. | |
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.