Vehicles Window

Vehicle-Trajectory Linking:

Let us briefly consider the idea of linkage between scene vehicles and scene trajectories, and how this relates to the ScriptAI Editor:

Vehicles and Vehicle Trajectories can be thought of as independent entities, ie a vehicle can drive on many trajectories, and conversely - a trajectory can be driven by many vehicles. It is not until a vehicle and a trajectory become linked in some way, that the ScriptAI Editor has something which it can execute. Note that they exist independently, and have independent windows in the editor. Another way to think about this, is that a trajectory does not neccessarily have to be related to a vehicle.

The way in which vehicles and trajectories are linked will be discussed later in this documentation (when we get the Trajectory Edit Window), but for now it is enough to note the above. We can thus look at both the Vehicles Window and Trajectory List Window separately, before discussing how to link them together.

Note: Even although a trajectory can be driven by many vehicles, there are non-physical cases such as the case when a small car with a small turning circle records a trajectory, and then this same trajectory is then linked to a bus or truck which does not have a turning circle small enough to perform the trajectory correctly. The user must be careful with such non-physical issues. The ScriptAI algorithm can still attempt to follow the trajectory, even if it means breaking the laws of physics.

Vehicles Window:

The marked-up illustration below shows the Vehicles Window with all of its features.

Vehicles Window Vehicles Window

List Of All Loaded Vehicles:

The main part of the Vehicles Window is a list of all the vehicles loaded into the simulation. Vehicle names and unique Id numbers are provided to aid identification. Since we are already within the World Editor, it is easy to create more vehicles, eg by cloning existing vehicles (copying and pasting). Any change in the number of vehicles will be reflected in the Vehicles Window.

Remove Vehicle:

Any vehicle can be removed from the simulation by clicking on the ‘Remove’ button. If the vehicle is attached to a trajectory, the linkage will be destroyed upon doing so.

‘Go To’ Vehicle:

Clicking on the ‘Go To’ button will instantly move the camera to the perspective of the selected vehicle (the vehicle who’s ‘Go To’ button was pressed). The camera mode will also change to ‘Orbit’ when performing this operation.

Switching between scene vehicles in this way can be useful when trying to determine where vehicles currently are in relation to eachother, and allows the user to determine what is in the vehicles’ field of view.

Open Linked Trajectory:

If the vehicle has been linked to a trajectory, this button will appear. This is a shortcut to open the Trajectory Edit Window for the linked trajectory. If there is no trajectory linked to the vehicle, this button is not available for the vehicle. In the illustration above, we can see that this is only available for the third vehicle, and not for the first two vehicles.

Close Window:

The Vehicles Window can be closed using the ‘Close’ button on the window. This is equivalent to closing the window from the ScriptAI Editor Tool Window. Upon closing, the color of the Vehicles Window button (on the Tool Window) will change from grey to white to reflect this.

Record Trajectory:

The ‘Record’ button is available for any vehicle which does not have a trajectory attached. Upon pressing this button, the camera will switch to the Orbit camera at the selected vehicle (if it is not there already) and instantly start to record the space-time movement of the vehicle. The user should drive the vehicle as required, thus creating a trajectory.

During recording, the ‘Record’ button will change to a ‘Stop’ button. When finished recording, this ‘Stop’ button should be pressed. The trajectory will then be created and made available for editing across the ScriptAI Editor.

Note: It is recommended to first move the camera to the vehicle which is going to be recorded, so that the user can get their bearings regarding where to start driving the vehicle. This is especially important if the ‘Overlay’ feature is being used, and information from other vehicles is important to the trajectory about to be recorded. The trajectory can always be edited later, however.

ScriptAI Mode:

This radio button allows the selection of either time-based ScriptAI (T-Based) or velocity-based ScriptAI (V-Based).

For more information about ScriptAI modes, this documentation has a dedicated page.

Attachment Status:

This text indicates if the highlighted vehicle is linked with any trajectory. If there is a linkage, the trajectory name will appear in the text.

Last modified: 20/9/2023 11:35

Any further questions?

Join our discord