Hello, I need your help to complete the last levels of my game, Hop! 2D (see in projects topic)
Hop, the main character of the game, jumps continuously and bounces against walls when hitting one (I simply change the sign of his horizontal speed and apply a coefficient a bit smaller than 1 in that case).

Everything's fine with static walls. Things get more complicated when Hop wants to bounce against a horizontally moving wall. Currently, the wall is a kinematic body and its position is driven by an AnimationPlayer node and I'd like to take into account the relative speed between it and Hop. The main problem I have is to find a simple way to get the accurate wall's speed (its movement is cyclic and linear). I have tried to calculate it using several positions and delta, but this is obviously not the best way (float approximations, probably not memory-friendly calculus). Maybe I should use paths instead ?
What's your opinion about it ? Thanks for the help.