How do you tilt an asset

Roy3b3

Active member
Generally around the world there are very few dead-flat streets. In real life, most have an incline, a slope or a hill in every direction.

Placing cars and trucks on sloping streets can be a problem,.. the set of wheels on one end can be touching the ground, whilst the other end is high off the ground. OR, with an adjustment to the high-flying end, the other end has it's wheels buried well past the hub-caps.

With shadows switched-on in TRS19, it is now more obvious if these types of assets are not positioned correctly.

We know all assets can be rotated to point in whatever direction we choose.

However, does anyone know of an adjustment that would enable a car to be positioned with all four wheels on a steep slope?

Is there a rotation factor I am not aware of?

I appreciate any thoughts on the matter.

Cheers,
Roy
2019-01-16-140942.jpg
 
However, does anyone know of an adjustment that would enable a car to be positioned with all four wheels on a steep slope?
If the asset supports rolling then you press and hold shift while rotating the asset.
http://online.ts2009.com/mediaWiki/index.php/KIND_Scenery#rotate-yz-range
However rolling is usually inconsistent with the direction of travel of a vehicle - it all depends on how it was originally constructed. A lot of assets don't support rolling when they should - it would be better to have the default as allowing rolling, so the creator could prevent it when not applicable, rather than having to allow it when it is applicable.
 
If the asset supports rolling then you press and hold shift while rotating the asset.
http://online.ts2009.com/mediaWiki/index.php/KIND_Scenery#rotate-yz-range
However rolling is usually inconsistent with the direction of travel of a vehicle - it all depends on how it was originally constructed. A lot of assets don't support rolling when they should - it would be better to have the default as allowing rolling, so the creator could prevent it when not applicable, rather than having to allow it when it is applicable.


Thanks mate. I thought as much, so there is no easy fix to existing assets.

I did clone an asset to see whether I could modify it accordingly, without any success. I just don't have that expertise.

Cheers,
Roy
 
The problem then is the asset. I've had instances where the rolling works perfectly on some assets, but on others they don't work as well due to where the center of the asset is located and which direction the author used when creating the asset's pivot point if any.
 
Roy

It's not difficult, but it does require you to edit and modify an existing asset, or clone it and modify that. Anything you do will only be local to your Trainz installation (unless you have permission to upload the clone to the DLS or other website).

The simplest modification is just adding a "rotate-yz-range" line to the config.txt file at the "root level" (i.e. not buried within any curly brackets);

Code:
rotate-yz-range    -180,180

The units are degrees, and this example allows tilts from -180 to +180 degrees.


Depending on which direction the car was made to face when created, the tilt will be either side-to-side or front-to-back. If it's the "wrong" way for you, even that problem can be fixed with more editing. It requires you to add an "orientation" line of text, this time into the mesh-table section of the config, as in this example;

Code:
mesh-table
{
  default
  {
    mesh                                "vehicle.im"
    auto-create                         1
    [B]orientation                         0,0,[/B][B]1.5708[/B]
  }
}

This tag changes to orientation of the mesh relative to how the creator made it in a 3D modelling program. The units in this tag are awkward radians, not easy degrees (thanks for nothing Obama, or possibly N3V programmers). The above example says there is to be 0 change about the X and Y axes, but a 1.5708 radian rotation about the Z axis.

Remember that 180 degrees = Pi radians = 3.14159 radians.

So 90 degrees = 3.14159/2 = 1.5708 radians.

You can make the angle negative if it's gone the wrong way.
 
Thanks guys, I appreciate your feedback.

I'll certainly give your information some practice.

It makes me think now,.. why is something as simple as the rotation of an object in any direction, not incorporated into the overall Trainz program. It would make life a little more easy.

Thanks again for the support.

Cheers,
Roy
 
.. why is something as simple as the rotation of an object in any direction, not incorporated into the overall Trainz program. It would make life a little more easy.

I have periodically needled N3V about that very thing over the years, but get fobbed off with weak explanations every time.
 
Back
Top