This is an old revision of the document!
Table of Contents
Creating a Control Rig
The Control Rig is a central component of vehicle animation in SubwaySim 2. It controls important animated elements of the vehicle body and undercarriage and acts as a bridge between animation logic and the skeletal mesh.
Typical elements controlled via the Control Rig include:
- Wheels
- Couplings
- Bogies (trucks)
- Other mechanically driven components
Because a Control Rig is not generated automatically when importing an FBX file, it must be created manually.
Creating the Control Rig Asset
To create a Control Rig, navigate to the folder where your Skeletal Mesh is located.
In the Meshes directory:
- Right-click on your Skeletal Mesh
- In the context menu, search for Control Rig
- Select Create Control Rig
Unreal Engine will now generate a new Control Rig asset in the same folder.
Naming the Control Rig
The Control Rig should follow a clear and consistent naming convention.
We recommend:
- Using the same name as the vehicle or Skeletal Mesh
- Prefixing it with CR_
Example:
- Skeletal Mesh: `TestVehicle`
- Control Rig: `CR_TestVehicle`
This makes it easy to identify and reference the Control Rig later when working with Animation Blueprints.
Opening the Control Rig
Open the newly created Control Rig by double-clicking it.
You will now see the Control Rig editor, which consists of:
- The viewport displaying the Skeletal Mesh
- The graph editor for logic and node connections
- The Variables panel (located in the lower-left area)
Creating Required Variables
Before adding any logic or nodes, we must define the required variables.
These variables are used to receive values from Lua via the Animation Blueprint and apply them to the Skeletal Mesh.
In the Variables panel, create the following variables with the specified types:
- CouplingRotation1 → Transform
- CouplingRotation2 → Transform
- BogieRotation1 → Transform
- BogieRotation2 → Transform
- DeltaWay → Float
Make sure that the variable types are set correctly. These variables will later be used to drive rotations and positional changes of vehicle components based on simulation data.
At this point, the Control Rig asset is correctly created and prepared for further setup.
(Continuation follows: setting up nodes and applying the variables to the skeletal bones.)
