
Once the model was complete and exported to a shape file I edited the animation section as follows:
animations ( 1
animation ( 3600 30
anim_nodes ( 2
anim_node MAIN (
controllers ( 0
)
)
anim_node bone (
controllers ( 1
tcb_rot ( 5
slerp_rot ( 0 0 0 0 1 )
slerp_rot ( 900 0 0.7071068 0 0.7071067 )
slerp_rot ( 1800 0 1 0 -1.629207E-07 )
slerp_rot ( 2700 0 -0.7071066 0 0.7071069 )
slerp_rot ( 3599 0 0 0 1 )
With this sequence in place the table rotates counterclockwise in shape viewer as it should. So all seemed to be OK.
I have made the length of my model to match that of the original table (n1t16mturntable.s) with the intention of simply replacing the original table with my model. I first replaced the file as planned and ran MSTS. The new model showed up in the correct locations and I could drive a train over them so apparently the replacement worked OK. I also opened the route in OR and likewise could see the tables and operate trains over them but I had not yet added turntables.dat in the OR folder so the tables were still not operable. Once I could see the tables OK in OR I added turntables.dat to the route's OpenRails folder. There are two occurrances of the table so turntables.dat looked as follows:
2
Turntable(
WFile ( "w-012382+014172.w" )
UiD ( 182 )
XOffset ( 0 )
YOffset ( 0 )
ZOffset ( 8.043 )
TrackShapeIndex ( 39941 )
Animation ( "TRACKPIECE" )
Diameter ( 16 )
)
Turntable(
WFile ( "w-012372+014220.w" )
UiD ( 435 )
XOffset ( 0 )
YOffset ( 0 )
ZOffset ( 8.043 )
TrackShapeIndex ( 39941 )
Animation ( "TRACKPIECE" )
Diameter ( 16 )
)
The first line is blank as required.
When I run Open Rails with the turntables.dat file in place I get the following error in the OpenRails.log file:
Warning: System.IO.FileLoadException: {TileX:-12382 TileZ:14172 X:892.288 Y:1983.84 Z:191.124} scenery object 182 failed to load ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
The turntables are no longer visible in the route, makes sense, the shape failed to load per the message. If I remove the turntables.dat file rendering the turntables static I can see them again. So the problem seems to be related to the animation, or am I wrong?
Can anyone offer advice?
I am attaching the log file for review if needed. There are other issues reported but I am thinking they are not related to the current problem. I didn't create the route originally and wasn't aware of the problems within the route until this problem arose.