Hi everyone, I’m working on an infinite runner where the player should be able to jump on boxes that move from right to left on the screen.
The issue I’m facing is that I have coins using a regular body that moves right to left too via the setVelocity
method.
On the other hand, the boxes use a static body. Everything works as expected except for the fact that the boxes and coins move at different speeds. This is because I move the boxes by manually adjusting the X position of the static body, while the coins are moved using the setVelocity
method.
How would you suggest I ensure that both the boxes and coins scroll at the same speed?
Thanks in advance