This document is about: QUANTUM 2

Utilities / Miscellaneous

Available in the Gaming Circle and Industries Circle

Driving Path Editor

The Driving Path Editor (and bezier spline implementation) is based on an open source implementation and could be much improved for a more customised solution.

A new driving line can be added by adding an empty GameObject under the Gameplay scene entity and adding a DrivingPath component to it. The DrivingPath is a bezier spline which can be edited in the scene view. This bezier spline is later converted into the driving line when a quantum scene map is baked. Check the console log, after baking, to check if the line was correctly added.

utilities log

Driving Path Settings

The line's difficulty is set in the DrivingPath component. It is possible to specify which line difficulty an AI will be able to drive on in the AIConfig. An AI can drive even on lines with a difficulty outside of the specified range in AIConfig if no suitable line is found.

The number of points the driving line will have can be influenced via the Vertex Path tab of DrivingPath component.

utilities driving path

Adding / Removing Points

When creating a new path:

  • Add points by clicking in the Scene view while holding SHIFT key; and,
  • Remove points by holding CTRL key and clicking on the point.

It is possible to add points to an existing line by holding SHIFT and clicking on the line.

N.B.: The order of the points matters! Add points in the direction of the race track.

utilities bezier

After selecting a bezier control point (green sphere), the speed value can be tweaked in the inspector. This value is a relative number. Speed of 1 means normal speed, speed < 1 is slowdown and speed > 1 is possibility for higher speed (e.g. use Nitro). Every AI difficulty handles the speed value a little differently. The related settings are LineSpeedAggressivity and NitroMinLineSpeedMultiplier. Both can be found in the AIConfig asset.

Map Selector

The MapSelector is a utility for faster switch between gameplays (races) in one scene. In the City scene it is located on the Races gameobject.

utilities map selector

Set Parent Utility

The Set Parent Utility is very simple and very useful when building the City scene. It helps with parenting selected objects under a specified GameObject - e.g. parent park trees, bench and rocks under the Park object in the hierarchy.

Open it from menu Racing > Set Parent Utility.

utilities set parent

Sub Asset Editor

This an open source utility which helps with injecting Unity assets into other assets. It used to inject additional buttons (and other UI elements) animations directly into the button animator controllers. To test it open the editor (Tools > Sub Asset Editor) and select an animator controller (e.g. the RaceController.controller asset).

For more information, check the assets' Github Repository HERE.

Back to top