Scrolling Ground Spawning Problem
Hello,
I have a screen size of 568 X 320
a Game Size of 568 X 320
(iOS Platform)
And an actor that is 1,028 X 61 at a position of 512 x -15...
I am trying to make the ground actor scroll to the Left and re-spawn once it hits a certain point.
My issue is, it will have a slight delay when it reaches the point at the left where it's supposed to re-spawn, and if i change the position it can reach when it needs to spawn, it doesn't affect the spawning at all.
I've also tried to change the Actor width to 1,136 X 61 in order to have it spawn properly when reaching the center point, but if i change the actor to this size it stops the spawning all together and i end up without an actor after the first one disappears.
wigglebox.deviantart.com/art/Screen-Shot-2014-04-02-at-11-56-46-AM-444698947
wigglebox.deviantart.com/art/Screen-Shot-2014-04-02-at-11-56-52-AM-444699419
Here are some screenshots of my code for reference to what I am doing.
Best Answer
-
alexanderdoubleu Posts: 43
I usually make an invisible actor called something like... respawn ground? and make it invisible and then use the timer and do every blah blah seconds respawn actor ground and make sure you make it relative to scene and not actor…I usually don't like using attributes for things like that.
Answers
Thank you for your reply on this, I ended up just going a different route and creating two actors the width of the screen then just having them get repositioned when they got off screen at a constant cycle. Sometimes it spawns them a little wonky still but it works much better than the way I previously did it. I finally got it submitted to apple too. So fingers crossed that it gets accepted this time.