The tilt option

lukewc

Member
Can someone please refresh my memory? I am looking for the command not to rotate a object but to tilt it, I forgot how to do it!ThanksLukewc
 
You need to select the Rotate object button in Surveyor and hold the Shift key.

This will then roll (tilt) the object provided the asset config.txt file had been set up to include that operation.

If it won’t roll you can make it do so by editing the config.txt file for that asset.

Add the following:

rotate 1
rotate-yz-range -90,90


The last two numbers limit the angle of roll in each direction to the number of degrees of tilt you want. You can choose your preferred angle by using any number value between 1 and 180. Make sure the first one has the minus symbol, and that they are separated by the comma. I can't recall for sure, but I believe that the digits for the minus value and the non-minus have to be the same.
 
Last edited:
Thanks for that.

I don't have AssetX, but have seen several references to it. It looks very good and easy to use.

Do you know if it works with all versions. I'd be interested in using it if it's compatible with TRS2004.


Edit: Just found that it works in TRS2004 and above in this helpful thread.
 
Last edited:
You need to select the Rotate object button in Surveyor and hold the Shift key.

This will then roll (tilt) the object provided the asset config.txt file had been set up to include that operation.

If it won’t roll you can make it do so by editing the config.txt file for that asset.

Add the following:

rotate 1
rotate-yz-range -90,90


The last two numbers limit the angle of roll in each direction to the number of degrees of tilt you want. You can choose your preferred angle by using any number value between 1 and 180. Make sure the first one has the minus symbol, and that they are separated by the comma. I can't recall for sure, but I believe that the digits for the minus value and the non-minus have to be the same.

I realise this is an old thread but it is the only one that answers my question.

I have the same problem with objects not roll/tilting. I have edited the config file but they still won't roll.

Am I missing something - like where the string goes in the config text?

Thanks in advance for any help
 
I realise this is an old thread but it is the only one that answers my question.

I have the same problem with objects not roll/tilting. I have edited the config file but they still won't roll.

Am I missing something - like where the string goes in the config text?

Thanks in advance for any help

The strings go anywhere in the config.txt file except within a container. A container has {,} surrounding them.

I would put them just before the mesh-table.
 
I don’t think the tag “rotate 1” is needed. It refers to the ordinary type of horizontal (xy) rotation which is active by default in scenery objects. This tag would only be useful if you wanted to prevent rotation, in which case it would be set as “rotate 0”.

For roll or tilt, the essential tag is “rotate-yz-range” with its +/- limits on rotation angles. The maximum angles it accepts are 180 degrees in either direction. There is also a tag “rollstep” by which you can supposedly set the increment of roll/tilt (yz) rotation. In my experience, this tag doesn’t seem to work, but I might be wrong.

Unfortunately, despite many requests, trainz still doesn’t have a “rotate-xz-range” ability. If it turns out that the tilt is not in the direction you want, I think the only option is to insert an “orientation” tag into the object’s mesh-table with a value that rotates the mesh by 90 degrees about the z axis. This tag can specify rotations around x, y and z axes, so it is quite powerful. For no good reason, it uses radians instead of degrees. So, a typical instance of “orientation” giving a 90-degree (pi/2) rotation about the z axis only, looks like this;

{
mesh “vehicle.im”
auto-create 1
orientation 0,0,1.5708
}

..where vehicle.im is the name of the mesh file, and the rotations around x and y axes have been set to zero.

If there are a set of LOD meshes, each one needs an orientation tag with the same value.


References:

Index of Tags & Containers - TrainzOnline (ts2009.com) << No mention of the 'orientation' tag, but all the 'rotate' tags are defined here.

https://online.ts2009.com/mediaWiki/index.php/"mesh-table"_container#Mesh_subcontainer << the 'orientation' tag is described in the list of supported tags here.



.
 
Last edited:
Here is what I use;

height-range -10,10
rotate-yz-range -10,10
rollstep 0.01
rotstep 0.01


The rotate tag is not needed, it is set to 1 (true) by default. If you don't want to rotate, then;

rotate = 0
 
Does rollstep 0.01 actually work?

The wiki is rather vague on whether such small increments are valid. I have seen the default value of this tag quoted as “approximately 0.5 degrees” in one section of the wiki, and 1.0 degrees elsewhere. And the only example values mentioned are all quite large, being 1, 5, 10, 20 degrees, but never anything smaller than the default.

It would certainly be useful for setting things like the gradient of fixed track if really fine increments were possible, but I have my doubts that this tag allows it.


.
 
Last edited:
I saw this first in BNSF50 XING assets, so I have just been using that number. It works and the increment is 0.1 in Surveyor when rolling. I have not played with any other values because it just worked. Would be nice to know for sure.
 
I've just taken a harder look at it in a T:ANE route. With rollstep set at 0.01 in the config, my observations were;

Using Shift-Rotate, the smallest increment of tilt I could get in practice, was 0.5 degrees.

Using Shift-Ctrl-Rotate, the smallest increment became 0.1 degrees.

Including Alt in the key combination had no effect.

Interestingly, I got the same results even if there was no rollstep tag in the config. So it seems that rollstep is only good for specifying increments larger than the default 0.1/0.5 degree tilts. I suppose that's why I thought earlier that it wasn't working. My assumption was that rollstep was there to help give us finer control, but I was wrong.

There's no way to get 0.01 degrees, so it's pointless having rollstep 0.01 in the config. Maybe versions TRS19+ are different, but I haven't tested that.


.
 
Last edited:
In surveyor 2.0 you can roll any object, by clicking the "fine adjustmant tool" and clicking and holding the green bar. Alternatively you can also in the asset info panel after you have clicked the object click the little dropdown arrow next to "pos" and you can type in the exact roll you want. "r" is left-right while"p" is up-down.
 
Does that mean it can roll in both yz and xz planes, or is roll still limited to one plane (yz)? I’m not sure what the terms left-right and up-down mean in relation to roll (they sound like positional translations). And what is the finest angular increment of roll that it allows?

.
 
Last edited:
Does that mean it can roll in both yz and xz planes, or is roll still limited to one plane (yz)? I’m not sure what the terms left-right and up-down mean in relation to roll (they sound like positional translations). And what is the finest angular increment of roll that it allows?

.


Yeah it can roll on both planes. Here is a screenshot demonstrating random rotations. You can see it rolls back and forth and left to right, and since you can type in any increment it can go as low as you want.

My-Trainz-Screenshot-Image.jpg
 
Back
Top