S
S
StynuBlizz2019-09-30 12:31:07
Game development
StynuBlizz, 2019-09-30 12:31:07

How to move obstacles in the runner?

I am making a runner for mobile phones, and based on what I read about the development of runners, I realized that it is necessary to move game objects towards the character, and not move the character around the game world. The problem is, I can't figure out how to make this smooth movement of obstacles towards the character and so that it does not cause freezes. I looked in the direction of transfrom.Translate() but I doubt the correctness of this decision, because at one moment there can be up to 50 objects in the visible area (obstacles, coins, etc.), so I don’t think that calling this method for 50 objects each each frame is the best solution. What is the best way to make objects move smoothly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dollar, 2019-09-30
@dollar

No need to duplicate a question while deleting the old . This is a direct violation of the rules (clause 4.1), which clearly states:

it is strictly forbidden to duplicate a question in order to re-draw attention to it
In addition, someone at the time of deletion could still write a detailed answer. Or maybe he is still writing, thinking that the old question is still alive. Poor fellow. After all, his works will disappear immediately after clicking on the "Submit" button.
On the topic of the question: you can create objects in a different reference system, and move the system itself. This is the parent empty object.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question