Increase speed of car if it goes on a certain area of a track

Hi

I’m developing a top down car racing game  - overall going well but I can’t work out how to make the car go faster if it crosses a speed booster section of the track where by it doubles the speed of the car is currently travelling (100 Kph would double to 200 Kph) or automatically speed up to a set speed regardless of what the car was previously travelling e.g. up to 250 Kph from 100 Kph

Does anyone have any suggestions on how to go about it?

Many Thanks

Matt

Essentially your car is an object and the speed boost section is an object, so you could do collision detection between two objects. If you’re not using physics in your project then look at this link:

https://coronalabs.com/blog/2013/07/23/tutorial-non-physics-collision-detection/

If you are using physics then look up how to turn the speed boost section into a sensor.

When you detect that the car “collides” with the section you increase the speed value.

Essentially your car is an object and the speed boost section is an object, so you could do collision detection between two objects. If you’re not using physics in your project then look at this link:

https://coronalabs.com/blog/2013/07/23/tutorial-non-physics-collision-detection/

If you are using physics then look up how to turn the speed boost section into a sensor.

When you detect that the car “collides” with the section you increase the speed value.