Test Track Help - Car Goes Off Custom Track

Hi there,

I am currently having difficulty, when designing a custom track the car seems to keep going off the track.

This picture is the track.

This photo is the track with the racing line (from the track maker) in red.

This picture has yellow circles indicating where the car goes off the track.

And this is the code I have in the LUA file.

–You Can use 0, 1, -1 instead.
local STRAIGHT = 0
local LEFT = 1
local RIGHT = -1

Track = {
Name = “Track”,
–Track Image Info
–Track Image must be 1280 x 720
–Start Position on the Image x,y from Top Left
Start = { 417, 502 },

    --How many pixels per meter ( Pixels / Length )
    --Measure a long straight and then manipulate from there
    Scale = 52 / 10,
    Layout = { STRAIGHT, LEFT, LEFT, LEFT, LEFT, RIGHT, STRAIGHT, RIGHT, STRAIGHT, LEFT, RIGHT, RIGHT, RIGHT, RIGHT, STRAIGHT, LEFT, LEFT, STRAIGHT, LEFT, STRAIGHT, RIGHT, RIGHT, RIGHT, STRAIGHT, RIGHT, RIGHT, },
    LayoutInfo = { 100, 90, 90, 40, 45, 85, 10, 90, 2.5, 90, 90, 90, 90, 90, 5, 90, 90, 25, 40, 10, 90, 90, 40, 100, 90, 90, },
    CornerRadius = { 0, 23, 23, 23, 5, 25, 0, 5, 0, 5, 30, 25, 18, 10, 0, 8, 8, 0, 20, 0, 37, 33, 47, 0, 6, 7, },
    Slope = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    Sportiness = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    Camber = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    Split1 = 1,
    Split2 = 2,

}

Help would be very much appreciated. :smiley:

I have done a search for “Test Track Problem Help” and could not find the solution I am looking for.
I have also viewed the tutorial posted by 07CobaltGirl (which I did find informative and useful, without it the car may have ended up somewhere crazy).

Thanks

I will look at this. It can be hard to make the lines perfect on the track.

Is there a specific length you are going for with the track? (ie starting straight is 1/4 mile)

You’re telling me! I pretty much gave up on releasing any of my custom tracks because in some places they’re so far off.

OK, here is what I came up with. Short tracks and excessively long tracks are tough to work with due to the scaling. Nothing, however, is impossible. Mine isn’t perfect. Keep in mind the length on this track is less than 1km and has a lot of curves, which complicates the track builder. Longer tracks give more room for correction. The top of the outside long sweeper is still going a bit inside the track, but short of making the curves even shorter (and harder to work with), it’s the best I could come up with quickly. Some of my tracks take quite a long while to get all the curves perfect, and a couple have even been further fine-tuned by others in the community. This should give you some idea on how to lay out corners in the track editor, however. I hope it helps!

track.lua (1.2 KB)

OH, and yes, there’s an extra 100m straight at the end going past the starting line. It can easily be removed. I was using it as a guide. Time on this track (with the additional straight at the end) was 47 seconds.

Thank you very much.
It is supposed to be s short track with the main straight only 100m, length is perfect.
I appreciate the help. :smiley:

You’re very welcome! If you need more help, just ask! :slight_smile: