Open Rails

Simulator.XNAMatrixFromMSTSCoordinates Method

[This is preliminary documentation and subject to change.]

The front end of a railcar is at MSTS world coordinates x1,y1,z1 The other end is at x2,y2,z2 Return a rotation and translation matrix for the center of the railcar.

public static Matrix XNAMatrixFromMSTSCoordinates(
   float x1,
   float y1,
   float z1,
   float x2,
   float y2,
   float z2
);

See Also

Simulator Class | ORTS Namespace