Good day!
Give me some advice.
The function should be as follows: the car leaves from below, reaches the extreme point on the right, switches gear to -1, reaches the extreme point on the left, switches gear to 1, leaves in the upward direction.
My question is: how to make the car move STRICTLY along the points without clinging to neighboring ones (leave the route).
I’ve tried removing the dots behind, it doesn’t help.
I tried to write ALL the points in an array and then add them 3 at a time and delete those from the back, in which case the car loses the route.
Meaby I do think another way for this solution?
Many thanks for any good advice.
this my problem spline:
is my function for search points of spline and move:
this is my unsuccessful attempt at a solution: