Overview
To create a right-hand drive car based on the left-hand model, you need to refine the graphic model of the car, set up the configuration files and visualization function.
1. Model Refinement
Open the source file of the car interior, in this example it is a model called saloon. Select the body object and apply the Mirror modifier, which will reflect the interior along the X-axis:
Some elements, such as the dashboard, should not change in the left-hand drive version. Select the dashboard by choosing the Element type sub-object and apply the Mirror modifier again:
Now you can put the dashboard indicators and pointers back in place. To do this, select all these objects, move them closer to the desired place, and then using the snaps (Snaps Toggle tool) set them where you want:
After these manipulations, it is necessary to return the pivot (reference point) of each object to zero coordinates:
Together with the mirror image of the object, the scan was also reflected, so we need to fix it in places where it is necessary. To do this, select the problem place as a Polygon or Element sub-object and apply the Unwrap UVW modifier.
In the scan editing window, select the part of the scan that you want to flip and use Tools →
Flip Horizontal or Flip Vertical, depending on whether the element is represented horizontally or vertically on the texture:
This method is not always convenient for use, as it requires the texture itself to be adjusted.
You won’t be able to reflect the animation of the wipers; you will have to manually move the bones (Bone Objects) and get them animated again.
If there is an object in the cabin for determining the position of the driver’s head (headPosition sphere), it also needs to be moved, and the pivot should be reset to the center of coordinates.
Work with the interior model is completed, save the model under the name saloon_r and export it along the same path as the interior for the left-side version.
Similar actions need to be done in the model displayed in the third-person view. Open CarLod0 and find the salon object (in this example, saloon_l). We make a duplicate of this object, naming it saloon_r, and apply the Mirror modifier to it.
Thus, there will be two salons in the scene: saloon_l for the left-hand drive version of the car (indicated in green in the screenshot) and saloon_r for right-hand drive (indicated in red in the screenshot):
2. Configuration File Refinement
In the CarProperty.ini file located in the folder datagamedatacars<My_car_name>, where <My_car_name> is the name of your car, the values of some parameters are now divided into left and right versions of cars.
- Accessibility of left and right versions:
- Third-person interior view:
- First-person interior view:
- Driver’s location in the player’s car:
- Model of driver and steering wheel for player’s car:
- Tablet settings for VR:
- Camera settings support:
3. Visualization Refinement
In the cameras.xml file located in the datagamedatacars<My_car_name> folder, where <My_car_name> is the name of your car.
Example:
For rear view mirrors, settings are also added to the viewports.xml file located in the datagamedatacars<My_car_name> folder.
Example: