Hello everyone. I'm trying to do a double strip of steps.I am using the A* Pathfinding Project library. The first strip responds to mouse movement. This is what I did. The second bar should shrink as the character moves. The length of the path, the speed of the character and the length of the strip of steps are known. Please tell me the formulas how to connect these variables and the cycle, adjusted for the frame rate. That is, during the time at which the character walks, the strip of steps should decrease.
I did everything. Used the "Lerp" function. Here it is explained how to do everything in the very first example. https://gamedevbeginner.com/the-right-way-to-lerp-in-unity-with-examples/. There, the author promotes coroutines, I have not yet used them in my code.