Playmaker Forum
PlayMaker News => General Discussion => Topic started by: nhe1 on April 27, 2018, 12:50:18 PM
-
So I am trying to create this 2D background scene similar to Flappy Bird where in the background loops infinitely. Can someone kindly explain why my approach doesn't seem to work.
1. I store the initial spawn point of the background in a Vector3 variable in world space.
2. Once the Background enters the trigger it stores it as a game object variable.
3. I move it to initial spawn point using "Translate".
Thing is, it translates the object weirdly into the scene. I did check the initial stored coordinate during runtime and it is correct. I tried using Move Object and it works perfectly however when using translate using the stored coordinate I cant seem to find a way around it.
-
Use two same sprites for background. Put them one next to another horizontaly. #1 has spawn position A, #2 has spawn position B. Translate them both at same speed. When #1 reaches position C (let's presume it's the point left of the screen if you are "moving" right) use set position to move it to position A. Repeat with #2.
-
Hi,
There are multiple ways to achieve this.
I am making a tutorial for this and hope to upload to Youtube by the end of this week.
-
Hi.
Sorry i forgot to upload this, here is the tutorial video :