Creating paths

Top  Previous  Next

1.Invent a path :)

2.Go to the starting place.

3.In the console (choose BeamNG - System Lua mode) invoke the command:
wayPoints.addPoint(carId, speed)
Where carId - is id car for which the path creates (how to get car id); speed - with what speed follow to that point (in km/h).

4.Now every few tens of meters invoke this command :)

5.After creating a path save this path:
wayPoints.saveWayPoints(carId, "filename")

 

Notice: after the vehicle has overcome the last point - he will begin his path to the first point.

 

Waypoints stores in C:\Users\<UserName>\Documents\BeamNG.drive\Waypoints\

 

Do smooth acceleration of the vehicle! That is, If you want to accelerate the car to a speed of 80 km/h, do it like this:

First point: wayPoints.addPoint(1, 15)

After few tens of meters: wayPoints.addPoint(1, 30)

After few tens of meters: wayPoints.addPoint(1, 50)

After few tens of meters: wayPoints.addPoint(1, 65)

After few tens of meters: wayPoints.addPoint(1, 75)

After few tens of meters: wayPoints.addPoint(1, 80)

In this case, the car will accelerate smoothly and does not lose control.

 

A video:

 

Automatic creation of paths

1.Invent a path :)

2.Go to starting place.

3.In the console (choose BeamNG - System Lua mode) invoke the command:
wayPoints.startRecordingPath()

4.Start going :)

5.At the end of your trip invoke the command:
wayPoints.stopRecordingPath()

6.And save this path:
wayPoints.saveWayPoints(carId, "filename")

 

Or click on "Start recording path" and "Stop recording path" in ui app:

4