TRM Editor

From BallisticNG Wiki
Jump to: navigation, search

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

The "TRM Editor" is a tool built into the Ballistic Unity Tools, which allows you to manually and automatically define track sections which are then reconstructed in a similar way to the in-game track creator. This tool was designed to reconstruct BallisticNG's pre-TRM format tracks in the TRM format.

Note: Actions in the "TRM Editor" are recorded into the Unity undo buffer and can therefore be undone!

Setup[edit | edit source]

Meshes[edit | edit source]

Before you begin using the tool make sure your floor and wall meshes are separate meshes. This is not required for manually defining sections, but if you want to use the automatic tool then you will need to do this.

Once your meshes are in Unity, add a Unity mesh collider (NOT the "ballistic mesh collider" script, which is used for a different purpose) to both the floor and wall meshes.

Finally select the floor and set its layer to TransparentFX. This layer is a default Unity layer which everybody has and the automatic tool needs this to ignore the floor when scanning for the track walls.

Editor[edit | edit source]

Create a new Unity GameObject and attach the TrmEditor script to it. You can find this script by searching for it in the add component menu, which is presented when you click the "Add Component" button in the inspector pane.

Edit Modes[edit | edit source]

Sections[edit | edit source]

The sections mode allows you to define sections. This mode works as a continuous method of defining track sections. You click on vertices until you've defined the shape of a whole section and then the editor state resets and you can start clicking on the next vertices.

Manual[edit | edit source]

Manual mode requires you to define the track shape yourself. When in this mode you are presented with a row of buttons which show you your progress through defining the shape.

If you make a mistake, you can click on the buttons to go to any stage in the process you want. Under this is what you need to do for the current step. In short, you define the shape as follows:

Middle vert, floor left vert, wall left vert, floor right vert, wall right vert.

If you set the wall vert to the same vert as the floor vert, the editor will interpret this as you not wanting a wall on that side.

Automatic[edit | edit source]

Automatic mode requires you to click on the middle vert of each section and then click a vert to the right to define the right vector. This is then used to raycast for the walls and reconstruct an accurate as possible shape of the track. Keep in mind, this does not work well for junctions and you need to use the manual mode for this.

Junctions[edit | edit source]

Junctions mode allows you to define junctions and exits on the track. This should be done after other routes have been created as this will affect the tracks structural flow if you don't.

To create a junction, click on the section before the section that connects with the middle vert of the alternative. After this you hold Z and click on the first section in the route you want the junction entrance to connect to. For exits you do this the other way round, you click the last section in the route and then hold X and click the section that comes before the section which connects to the exits middle vert.

By holding both Z and X at the same time and clicking on a section, you can remove references. This can be useful if you make a mistake.

When you create a junction or exit you will be presented with a window asking you which side of the track this is on. The side you select, is the side the entrance or exit is on relative to the direction of the track.

Nexts[edit | edit source]

The nexts mode allows you to redefine a sections' next reference. You use this primarily to connect the last section to the first section to loop the track.

First click a section to select it. With that selected, hold Z and click on another section to set the selected sections next reference to the section you just clicked on. If you hold X and click on a section, you will remove the next reference.

General Settings[edit | edit source]

The don't connect next section toggle, doesn't update the previous sections next reference. Use this for jumps and starting new routes.

Auto centre middle vert toggle, will ignore your defined middle vert and will be instead be defined as the middle of the two opposite sides of the floor.