I'm creating an endless runner. The player can move in a certain range that is determined by an invisible box. Both the player and the box are KinematicBodies. Here is how it looks in the example scene:
The blue box is the player, the collision box before that belongs to the "Box" node. In this example, the box is constantly moving forward and the player is moving backwards (towards the box's CollisionShape):
The problem is that, if after a while I increase the speed of the box, the distance between the player and the box changes.
Low speed of the box:
High speed of the box:
Any guesses how to fix that?