Open Rails

AETraveller.DistanceTo(TrackNode, Int32, Int32, Single, Single, Single) Method

[This is preliminary documentation and subject to change.]

Returns the distance from the traveller's current location, in its current direction, to the location specified.

public float DistanceTo(
   TrackNode trackNode,
   int tileX,
   int tileZ,
   float x,
   float y,
   float z
);

Parameters

trackNode
Target track node.
tileX
Target tile coordinate.
tileZ
Target tile coordinate.
x
Target coordinate.
y
Target coordinate.
z
Target coordinate.

Return Value

If the target is found, the distance from the traveller's current location, along the track nodes, to the specified location. If the target is not found, -1.

See Also

AETraveller Class | Orts.Formats.OR Namespace | AETraveller.DistanceTo Overload List