Unity Track Editor

From BallisticNG Wiki
Jump to: navigation, search

The "Track Editor" assists in editing tracks, such as adding spawn points, weapon pads etc.

Run it by clicking "BallisticNG > Track Configuration > Track Editor".

This little window is packed full of buttons to take a track to the next level.

There are 3 aspects of a track you can edit:

  • Tiles
  • Sections
  • Atlas

Tiles[edit | edit source]

What is a tile?[edit | edit source]

A track is made up of many "tiles".

Tiles can be "marked".

For example, you can mark tiles to be a spawn point, weapon pad, boost pad etc.

Marking a tile as a boost pad (quick example)[edit | edit source]

  1. Ensure the Track Editor window is open
  2. Click "Boost"
  3. Click a "tile" on your track.

Marking a tile as a boost pad

Tile options[edit | edit source]

tiles > tile type
  • Normal: an unmarked tile.
  • Boost: boost pad
  • Weapon: weapon pad
  • Recharge: ships will recharge when over this tile. Used for "pitlanes"
  • Spawn: spawn pad

Ensure to place at least 16 spawn pads. Starting a game with insufficient spawn pads soft-locks the game at the "loading" screen.

Track Editor > tiles > wet/shadow/swooshable
  • Wet: ships driving over this tile will cause a minor "water" splash effect
  • Shadow: forces the tile to be pitch black. Ships driving over this tile temporarily become pitch black.
  • Swooshable: players driving over this tile will hear a "swoosh" sound effect (similar to when you're driving on the highway with the car windows down).

Players must be driving at high speed to hear the "swoosh" sound.

Sections[edit | edit source]

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 a 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 manually fixed so that they point correctly. Otherwise ships may behave erratically on your track.

Steps to do this are explained in the section below.

Sections 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 The "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>

Technical explanation of how a section's width & height are calculated[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.

Atlas[edit | edit source]

What is an atlas?[edit | edit source]

An atlas is 1 big grid of images.

Atlas options[edit | edit source]

atlas > tiles Lists images/textures used on your track.

Choosing textures is explained later on.

  • Set Entire Atlas: with this toggle ticked, the next left-click on your track will apply the selected texture to the whole track floor or wall.
  • Boost: texture for boost pads
  • Weapon: for weapon pads
  • Repair: for pitlanes
  • Spawn: for spawn pads
  • Wpn Rpl: short for "weapon replacement", this is the texture used for disabled weapon pads (usually disabled by a gamemode).
  • Spn Rpl: short for "spawn replacement".
atlas > U V Used to flip track textures.

"UV" is short for "UV mapping".

Unity Track Editor: atlas > textures Used to choose track floor/wall textures.
  • New Texture: Brings up a popup to choose a new texture
  • Diffuse: the texture.
  • Illum: illumination map for this texture. Explanation of illumination maps is outside the scope of this documentation, but just leave these blank if you don't know about them yet.