X
X
xies2020-11-17 21:23:19
Unity
xies, 2020-11-17 21:23:19

How to implement the code for a smooth infinite movement of a 2d object to the right when the scene starts?

I'm creating a 2D runner, I have a question.
how to implement infinite, smooth movement of a 2d object?
Note: at the beginning of the scene, he jumps forward and continues his movement, without any other interference.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
HemulGM, 2020-11-18
@HemulGM

The character always stays in place and does not move. But the background, the ground and the obstacles are moving. They are created before it and destroyed after it.
This is one of the methods how it can be implemented.
But you can do it with camera movement. The camera is attached to an object - a character. Which is driven by conventional physics (Rigid Body)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question