[IMPLEMENTED] Adding further rotation to Track.FreeObj
The Track.FreeObj command in CSV routes (or @freeobj in RW routes) allows for rotation in the XZ-plane ("along the Y-axis"), commonly called Yaw. There are various occasions where you would want Pitch (YZ-plane) and Roll (XY-place), too.
I suggest to extend the FreeObj command into the following syntax:
Index is the rail index to place the object relative to.
IdxStType is the free object index as loaded via Structure.FreeObj.
X is the offset along the X-axis in track coordinates. Negative values shift to the left, positive ones to the right.
Y is the offset along the Y-axis in track coordinates. Negative values shift down, positive ones up.
Yaw is the angle to rotate the object in the XZ-plane. When we look at the object from above it, negative values rotate counter-clock-wise, positive ones rotate clock-wise. The angle is measured in degrees.
Pitch is the angle to rotate the object in the YZ-plane. When we look at the object from the left, negative values rotate counter-clock-wise, positive ones rotate clock-wise. The angle is measured in degrees.
Roll is the angle to rotate the object in the XY-plane. When stand in front of the object and look at it, negative values rotate counter-clock-wise, positive ones rotate clock-wise. The angle is measured in degrees.
Here is an illustration:
Applications:
If you want to randomize the direction individual trees are facing at, it looks more realistic if they are banked a little (using Pitch for back-forward rotation and Roll for left-right rotation).
If you want to place static trains in curves which employ cant, you can roll the train to match the cant.
If you want to place signs that are not always perpendicular to the ground, you can angle them.
Etc...
For the release of version 0.8 (around 2008-07-31), this command is scheduled to be implemented. If there are any things to consider, please discuss them as soon as possible.
I suggest to extend the FreeObj command into the following syntax:
- Code: Select all
Track.FreeObj Index; IdxStType; X; Y; Yaw; Pitch; Roll
Index is the rail index to place the object relative to.
IdxStType is the free object index as loaded via Structure.FreeObj.
X is the offset along the X-axis in track coordinates. Negative values shift to the left, positive ones to the right.
Y is the offset along the Y-axis in track coordinates. Negative values shift down, positive ones up.
Yaw is the angle to rotate the object in the XZ-plane. When we look at the object from above it, negative values rotate counter-clock-wise, positive ones rotate clock-wise. The angle is measured in degrees.
Pitch is the angle to rotate the object in the YZ-plane. When we look at the object from the left, negative values rotate counter-clock-wise, positive ones rotate clock-wise. The angle is measured in degrees.
Roll is the angle to rotate the object in the XY-plane. When stand in front of the object and look at it, negative values rotate counter-clock-wise, positive ones rotate clock-wise. The angle is measured in degrees.
Here is an illustration:
Applications:
If you want to randomize the direction individual trees are facing at, it looks more realistic if they are banked a little (using Pitch for back-forward rotation and Roll for left-right rotation).
If you want to place static trains in curves which employ cant, you can roll the train to match the cant.
If you want to place signs that are not always perpendicular to the ground, you can angle them.
Etc...
For the release of version 0.8 (around 2008-07-31), this command is scheduled to be implemented. If there are any things to consider, please discuss them as soon as possible.