Track Editor: sections

From BallisticNG Wiki
Jump to: navigation, search

This article is a stub. You can help BallisticNG Wiki by expanding it.


What is a section?[edit | edit source]

2 tiles make up 1 "section".

A section represents a part of the track, & is used to:

  • Contain information about the centre, rotation, width & height of the track at that given point
  • Determine the tile that a ship is on (e.g.: a boost pad)

What are these pink lines?[edit | edit source]

Editing sections

Each section "points" to the section after it. This is done so that the AI can find the next section to drive toward.

For tracks containing branches, some sections need to be manually fixed so that they point at the subsequent section. Otherwise ships may behave erratically on the track.

Steps to do this are explained in the section below.

Section options[edit | edit source]

sections > type
  • Normal: just a normal section, nothing special.
  • Jump: indicates that this section is a jump. Put this on the section BEFORE a jump. This is mostly used for camera positioning, it basically makes jumps feel better to fly over.
  • Junction start: indicates the start of a junction. This should be set on the first section INSIDE the junction (NOT the section that connects to it)
  • Junction end: indicates the end of a junction. This should be set on the last section INSIDE the junction (NOT the section that the junction branches back out onto)
Unity Track Editor: sections > next This "Next" tool allows you to update the next reference on a section.Click on a section to select it (it will turn red) and then hold "Ctrl" and click on another section. The section you initially clicked on will now rotate to face the second section you clicked on.

The "Set Junction Reference" toggle allows you to set the junction reference.

It works exactly the same as above. When a junction reference has been set, the junction will have a second line drawn off it to show you the section it connects to.

When the selected junction already has a junction reference set, a "Remove Junction" button will appear. Click this button to clear the reference.

sections > metadata Left-click a section on your track to bring us these options:
  • Allow out of bounds: <todo>
  • Is Pitlane Entrance: This section branches off into a pitlane. This is for AI, & should only be ticked for a section on the MAIN ROAD (not the pitlane).
  • Is Maglock: in 2280 mode this will lock the ship to the track. In normal mode this will remove the tilt restraint on the ship so it can pass through loops without gimbal lock.
  • Rotation multiplier: sets how fast a ship can rotate over this section. 1 represents normal rotation speed.
  • Set Start Line: start line for a track, usually placed after the spawn pads
  • Set Mid Line: mid line. Usually placed half-way around the track. Used to ensure that players actually drove around the track (i.e.: lap validator).
  • Update section positions: <todo>

You can select multiple sections by holding down shift.

Technical remarks[edit | edit source]

A sections width and height are baked by raycasting on either side of the section against the track wall iteratively. Ships figure out which section they are on by a distance check against all sections. Once it has an initial section, that distance check is only performed on the surrounding 15 sections (30 in total).

Each section holds a next and previous reference that can be used for iterating over them out of the section arrays order if edited. They can also hold a reference to a connected junction which are also included in the above 15 section distance check.

Regarding junctions, these are re-indexed when the track starts so they they represent the same indicies as a normal route. This makes more accurate race position calculating possible.

Next up: Trigger System