Cars bouncing/jumping by completing each lap

When I use the function path_start like this: path_start(circuit,velocity,path_action_continue,true);

When completing each lap the cars kind of jump (I don't know if it's the right term in English), see the image below (I couldn't upload straight here, because the image is a gif):

https://imgur.com/mPWD4dY [/IMG]

I did some tests and realized that this jump directly influences the lap time.

At first I thought this was because the moment the car touches the finish line I change its speed to make a new lap time, but even the speed being unique jumps happen.

Modifying the use of the function path_start (path_start(circuit,velocity,path_action_stop,true);, with that I have to start the function every time the car collides with the finish line) I neutralized the jump, but this generated other problems for the operation of my game.

How to stop cars from making this jump?
 
Last edited:

rIKmAN

Member
When I use the function path_start like this: path_start(circuit,velocity,path_action_continue,true);

When completing each lap the cars kind of jump (I don't know if it's the right term in English), see the image below (I couldn't upload straight here, because the image is a gif):

https://imgur.com/mPWD4dY

I did some tests and realized that this jump directly influences the lap time.

At first I thought this was because the moment the car touches the finish line I change its speed to make a new lap time, but even the speed being unique jumps happen.

Modifying the use of the function path_start (path_start(circuit,velocity,path_action_stop,true);, with that I have to start the function every time the car collides with the finish line) I neutralized the jump, but this generated other problems for the operation of my game.

How to stop cars from making this jump?
You can insert gifs into posts just the same as regular images.
Just place the direct link to the image in between [img] and [/img] tags or use the button in the toolbar and paste the direct link to the image file (not the link to the imgur page).



How are you detecting the car crossing the finish line?

When you restart the path it will place the car at the path's 0 position based on the x/y origin, so I'm wondering if you are detecting the collision with the finish line based on the sprite mask(s) and it is jumping as you reset it back to the start of the path which repositions the car based on the sprite origin.
 
Last edited:
When the car hits the finish line, it ranges from a distance of 0 to 14 pixels (which I have already observed) to the origin of the circuit.

The finish line originates from the middle and center. The cars the same thing.

By touching the finish line I would like the cars to simply change their speed, which happens, but not without making that jump.

I made the speed change in other parts of the circuit, and the jump does not occur. The jump occurs even without changing the speed.

I tried to add the image directly to the question again, but again was unsuccessful.

A broken/corrupted file symbol appears.
 

rIKmAN

Member
Do you have a better gif or video of the jumping?
It’s kinda hard to see in the one you posted.

My guess if you posted the link to the imgur page again like in your OP, you need to use the DIRECT LINK to the image file which will end in .gif.
 
I will be providing the new video / gif.

Sorry for the delay.

From progress I only have the term that a member of another forum referred me as recommended for the situation: Stutter
 
So about restarting the path.

Sometimes the speed difference between the cars is minimal, so that the cars touch the finish line at the same step, even if one of the cars is slightly ahead of the other.

With this, the cars would be placed at position 0 of the circuit in the next step, that is, the same position. Which would not be correct, as the distance from one car to another would be ignored.

I tried to save the position of the car by touching the finish line to return to the position before starting a new lap, but I was unsuccessful.
 
Top