Problem of Attachment Point

lrt505

Light Rail Trainz
Hello. I am making an invisible station asset and problems have happened at the passengers. I have already set rotations to different passengers by setting the W orientation (or Z orientation) of the attachment points in the XML.

7699352490_a9c98bcb5b_o.png


7699352672_ea9c4f4b98_o.png


However, the rotations have NO effect and all passengers look at the same direction.
7699352174_b36ea5195e_b.jpg


What is the problem?

I add attachment points into the XML manually and use TrainzMeshImporter to convert into .im

Thank you for your solution.
 
which soft are you using to create it? max, blender or what? Usually the attachment points are to be inserted in the top view of the soft you are using and rotated in it. I don't know how it could work if the rotation of the points is done outside the soft. I usually insert the passengers attachement points randomly rotating them in 3Dmax top view
 
It may be the problem of the orientation settings x,y,z,w

After converting, I opened the mesh by Attachment Maker. However, I found that there were no changes of the orientation of the attachment points.

P.S. Sketchup RubyTMIX to export primary XML, Excel to generate random orientations.
 
I don't know how that software works anyway you have to check if maybe it rotates just the point but not its pivot. That could be a reason why after rotations your passengers still look all in the same direction.
 
Thanks. I have attempted to solve the quaternion orientations in Excel.

7699755160_9a70dc3cb3_b.jpg
 
Last edited:
Formulae to convert x,y,z rotations to quaternions are available from HERE.

I use a number of things from the above page in my Trainz tools, including Attachment Maker mentioned above.

Also you have a choice of rotation (orientation) format in the XML for TrainzMeshImporter.

For your passegers, you only need to rotate about the Z axis.
 
I have done it by setting the rotation to r= RAND()*PI radians
than convert to XML format 0,0,sin(r/2),cos(r/2)

It is the matter of mathematics
 
Back
Top