I am trying an Endless Runner (Side Scroller Game). I’m creating x number of floors, when user pass current floor, I’m re-positioning current floor to the end of last floor.
Floor contains Obstacles (Rock) and Coin, which randomly spawn, either Rock or Coin.
But since I’m re-positioning floor. If I pass current floor and collect all coins I won’t see coins again. How can I reset it?
I can Destroy and Spawn floor again and again. But somebody told me that it is not good approach. So can anybody tell me how do I re-spawn coins again after re-positioning of floor?
Update: I want to spawn multiple Obstacles but one at a . And multiple pickups at different location on floor.
Spawning is 2nd step. First I want to destroy child actor (rock/pickups). How can I do it?
In construction script I’m randomly calling either Rock or Pickup via two different functions. When character collect Pickups, I can call function to respawn coins. But then pickups also spawn on Obstacle/Rock Floor.