Another question, is there a way to convert scenery cars for traffic cars? I tried that once, but the car's tires go below the road. Is there a way to convert them and make them at level with the road?
I think the answer to both questions is ‘yes’ and I will assume you know how to clone an asset, open it for editing and find its config.txt file.
(1). Conversion
Converting a Kind scenery asset, even a tree, to a Kind scenery-trackside asset capable of being used as road traffic is just a matter of adding a line of text to the root level of its config.txt;
trackside 0.01
...where the number is the distance (in metres) the object will be to the side of the road’s invisible “track”. Positive values mean it will be at the right of the track going forward, negative values place it to the left. It’s usually best to make this value close to zero, because you don’t want your vehicle driving through roadside fire hydrants, signs, pedestrians, et cetera. If your modification has been successful, Content Manager will list it as a Track Object instead of Scenery, Vehicle, Building or whatever else it previously dreamed up for its Type.
As others have mentioned, such scenery-trackside assets need to be included in (referred to by) a Kind Region asset and that Region must be used by the Route in order for the vehicle to show up as auto-traffic.
(2). Orientation and position
You can change the direction the object faces and its spatial position relative to the road to correct problems like cars driving sideways, backwards, sinking into, or floating above the road surface. Do it by inserting tag lines into the
mesh-table section of the vehicle’s config.txt (i.e. at the same level as you find the tags mesh, mesh-asset, or auto-create). The tags required are;
orientation 0,0,0
position 0,0,0
..where my 0’s represent just the default values of these tags.
The value for
orientation is the rotational angle you want to apply to the vehicle around the mesh's X,Y,Z axes. The angle is in
radians, not degrees, just to make it user-
unfriendly in time-honoured N3V fashion. This may help; there are 2 x Pi radians in 360 degrees, so a rotation of 90 degrees will be;
2 x Pi x 90/360 = Pi/2 = 3.159/2 = 1.5795 radians.
Who said high school maths would never come in handy?
The values for
position are distance offsets, in metres, along the object’s X,Y,Z directions. Normally, it would only be necessary to adjust the vehicle’s height Z, so the value would be 0,0,0.3 if you needed to raise it by 0.3 metres. Use negative values to reduce the height.
These mods are what you would do to the clone of an asset, local only to your copy of Trainz. Distributing a cloned asset under your kuid for others to use would require permission from the original author of course. And remember to wash your hands for 20 seconds after touching another person’s assets.
.