Adding crew to footplate.

Discuss anything related to Train Simulator from DoveTail that does not fit in one of the more specific categories.

Adding crew to footplate.

Postby RobertM » Sun Jan 13, 2019 9:02 pm

I have been messing around with the JustTrains 7MT model, adding headboard, lamps, light flare & a footplate crew from the Exeter Kingswear DTG route, all successful.

Next I wanted to add a 3rd man on the footplate, a traction inspector who is all set up, bar his rotation. I would like to have him facing slightly out instead of looking forward, below is his entry in the loco BIN file, I have been through the lines one at a time to find the one that rotates him & the closest I can find is the 4th value down in the element section, but it makes him look distorted the higher or lower I set the figure. Is there a trick I am missing here please?

Code: Select all
                  <cEntityContainerBlueprint-sChild d:id="141446">
                     <ChildName d:type="cDeltaString">TractionInspector</ChildName>
                     <BlueprintID>
                        <iBlueprintLibrary-cAbsoluteBlueprintID>
                           <BlueprintSetID>
                              <iBlueprintLibrary-cBlueprintSetID>
                                 <Provider d:type="cDeltaString">RSC</Provider>
                                 <Product d:type="cDeltaString">BrightonMainLine</Product>
                              </iBlueprintLibrary-cBlueprintSetID>
                           </BlueprintSetID>
                           <BlueprintID d:type="cDeltaString">Scenery\Characters\Workman70_01.xml</BlueprintID>
                        </iBlueprintLibrary-cAbsoluteBlueprintID>
                     </BlueprintID>
                     <Matrix>
                        <cHcRMatrix4x4>
                           <Element>
                              <e d:type="sFloat32" d:alt_encoding="000000C0F9FFEFBF" d:precision="string">-0.999997</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="000000C088A8653F" d:precision="string">0.00264384</e>
                     THIS ONE ---->   <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>      <---- THIS ONE
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="000000C088A865BF" d:precision="string">-0.00264384</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="000000A0F7FFEFBF" d:precision="string">-0.999996</e>
                              <e d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</e>
                              <e d:type="sFloat32" d:alt_encoding="000000A09999F9BF" d:precision="string">-1</e>
                              <e d:type="sFloat32" d:alt_encoding="000000E0DB74FC3F" d:precision="string">1.73</e>
                              <e d:type="sFloat32" d:alt_encoding="00000000E02A18C0" d:precision="string">-6.5</e>
                              <e d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</e>
                           </Element>
                        </cHcRMatrix4x4>
                     </Matrix>
                     <ParentNodeName d:type="cDeltaString"></ParentNodeName>
                  </cEntityContainerBlueprint-sChild>


Thanks in advance.

Rob
User avatar
RobertM
Full Time Fireman
 
Posts: 51
Images: 1
Joined: Sun Jan 25, 2015 10:12 pm
Has thanked: 2 times
Been thanked: 64 times

Re: Adding crew to footplate.

Postby AndiS » Sun Jan 13, 2019 9:38 pm

You are looking at a 4x4 matrix. It has a 3x3 matrix inside, that is the first three of these 16 values are first row of the 3x3 matrix. The fourth is the X translation (location), best keep that at 0 in this case. Then follow 3 values for the second row of the 3x3 matrix, followed by the Y translation. Next comes the last row of the 3x3 and the Z translation. This is followed by 0,0,0,1. The 1 would be an overall scaling, in case you were interested.

For the 3x3 matrix, https://en.wikipedia.org/wiki/Rotation_matrix is helpful. Alas, it is not so clear with regards to which variant you need. I would try it out with a 90 degree rotation first, because that has simple values for sin and cos. Once you managed to turn that man to the side by 90° instead of making him lie around in mid air, it will be easy to substitute you 0 and 1s for sophisticated values.

Note that if these values do not match, i.e., if you don't have the proper sin and cos for the same angle in all the fields involved, then the object gets skewed.
AndiS
Top Link Driver!
 
Posts: 629
Joined: Wed Apr 09, 2014 5:48 pm
Has thanked: 260 times
Been thanked: 301 times


Return to Train Simulator Mess Room

Who is online

Users browsing this forum: No registered users and 1 guest

cron