Tilting an asset?

Ricke82

Member
Is there any way to tilt an asset? For example, I have a sign that was created perpendicular to the ground (90 degrees) and I would like it to lean a little to one side (say 75-80 degrees). Is there any way to do that?
 
Is there any way to tilt an asset? For example, I have a sign that was created perpendicular to the ground (90 degrees) and I would like it to lean a little to one side (say 75-80 degrees). Is there any way to do that?

Hi Rick,

Some assets can be tilted, others can't. There is a parameter that can be added to an asset that cannot be tilted.

In the config.txt file of the asset you want to rotate on the y-z axis (tilt), add in the following line:

rotate-yz-range -y,z; where -y is the negative range and z is the positive.

To edit a config.txt file, you need to open up the asset for editing. Using Content Manger, search for the asset (object) you want to modify.

Chose Clone from either the right-mouse button contextual menu, or from the Edit menu above.

This will immediately put you into open for edit, and this shouldbe the only asset open for edit.

Using the Edit menu again, however you go there, choose Open for Edit in Windows Explorer.

This will open up an explorer window, and display the contents of your asset including any texture files.

Double-click on the config.txt file, and the file should open up in Notepad, which is the default text-only editor on your system.

Put in the line mentioned above. Do not put in the very top of the file, but put it under one of the other lines. Also avoid putting in between an area that has curly braces {} around the text blocks, since this will cause an error of some kind.

Anyway once the line is put in, close and save the config.txt file.

Close the Explorer window, and right-click on it to bring up the contextual menu.

Choose view errors and warnings to see if there are any errors.

If there are none, with the asset highlighted, press CTRL-M to CoMmit the asset to the database.

Below is a sample of code from one of BNSF50's grade crossing assets:


DO NOT REMOVE THIS SPACE & DO NOT PUT TEXT HERE AT THE TOP
kind "mocrossing"
height-range -8,8
light 1
script "USAXStub"
class "USAXStub"
category-class "WX"
category-keyword "Crossing"
description "Grade Crossing Overhead US 4 Lanes 3 Tracks 45 degree with protypically animated gates and lights.
A special thanks to the following Trainz members for contributing to the working script's of these crossings, MartinVK , Phil Cambell at http://www.worldoftrainz.com, Andi06 at 'www.ajsmith.nildram.co.uk'. Without there help, these crossings would not be animated. Also thank's to the many Trainz members who input praise, help and constructive critisism on the forum which enabled me to refine the crossings to what they are now.
Please read the instructions located in the main folder for details on added features.
"
username "Grade Xing US OH 4L 3T 45"
author "bnsf50 / Clem Cummings"
contact-email "bnsf50@earthlink.net"
category-region "US"
category-era "2000s"
trainz-build 2.5 <<<THERE'S THE LINE YOU WANT.
license "This item is supplied free of charge for personnel use by registered users of Trainz. It or its contents must not be modified, offered for sale or supplied as any part of a Payware package or provided for downloading on any site other than Auran unless this is expressly permitted in writing by the author BNSF50 / Clem Cummings."
rotate-yz-range -10,10
kuid <kuid2:39134:101123:1>

extensions
..
..
..
etc.
 
JC I think you meant to point to this line instead of the build line. And by adding the rollstep and rotstep lines you have more controll over the tilt, that is you can tilt in .01 increments.
Code:
rotate-yz-range                -10,10
rollstep                         0.01
rotstep                          0.01

Just an added note to Rick. To use this feature in surveyor hold down the shift key while rotating the object and it will tilt instead of rotating.
 
Last edited:
JC I think you meant to point to this line instead of the build line. And by adding the rollstep and rotstep lines you have more controll over the tilt, that is you can tilt in .01 increments.
Code:
rotate-yz-range                -10,10
rollstep                         0.01
rotstep                          0.01
Just an added note to Rick. To use this feature in surveyor hold down the shift key while rotating the object and it will tilt instead of rotating.

Thank you... I thought I missed something...
I'm glad you stepped in and helped.

Rick, I'm glad I could get you going in the right direction.

John
 
Back
Top