Railroad Track
Parent |
A peice of railroad track over which trains can drive.
Functions
getClosestTrackPosition (worldPos : Struct<Vector>) → (track : Trace<RailroadTrack>, offset : Float, forward : Float)
Returns the closes track position from the given world position
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Closeset Track Position |
| Name | Type | Description |
|---|---|---|
World Pos |
Struct<Vector> |
The world position form which you want to get the closest track position. |
| Name | Type | Description |
|---|---|---|
Track |
Trace<RailroadTrack> |
The track the track pos points to. |
Offset |
Float |
The offset of the track pos. |
Forward |
Float |
The forward direction of the track pos. 1 = with the track direction, -1 = against the track direction |
getConnection (direction : Int) → connection : Trace<RailroadTrackConnection>
Returns the railroad track connection at the given direction.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Connection |
| Name | Type | Description |
|---|---|---|
Direction |
Int |
The direction of which you want to get the connector from. 0 = front, 1 = back |
| Name | Type | Description |
|---|---|---|
Connection |
Trace<RailroadTrackConnection> |
The connection component in the given direction. |
getTrackGraph () → track : Struct<TrackGraph>
Returns the track graph of which this track is part of.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Track Graph |
| Name | Type | Description |
|---|---|---|
Track |
Struct<TrackGraph> |
The track graph of which this track is part of. |
getVehicles () → vehicles : Array<Trace<RailroadVehicle>>
Returns a list of Railroad Vehicles on the Track
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get Vehicles |
| Name | Type | Description |
|---|---|---|
Vehicles |
Array<Trace<RailroadVehicle>> |
THe list of vehicles on the track. |
getWorldLocAndRotAtPos (track : Trace<RailroadTrack>, offset : Float, forward : Float) → (location : Struct<Vector>, rotation : Struct<Vector>)
Returns the world location and world rotation of the track position from the given track position.
Details
Flags |
RuntimeSync RuntimeParallel MemberFunc |
Display Name |
Get World Location And Rotation At Position |
| Name | Type | Description |
|---|---|---|
Track |
Trace<RailroadTrack> |
The track the track pos points to. |
Offset |
Float |
The offset of the track pos. |
Forward |
Float |
The forward direction of the track pos. 1 = with the track direction, -1 = against the track direction |
| Name | Type | Description |
|---|---|---|
Location |
Struct<Vector> |
The location at the given track position |
Rotation |
Struct<Vector> |
The rotation at the given track position (forward vector) |
Signals
VehicleEnter (Trace<RailroadVehicle> Vehicle Vehicle)
Triggered when a vehicle enters the track.
Details
| Name | Type | Description |
|---|---|---|
Vehicle |
Trace<RailroadVehicle> |
The vehicle that entered the track. |
VehicleExit (Trace<RailroadVehicle> Vehicle Vehicle)
Triggered when a vehicle exists the track.
Details
| Name | Type | Description |
|---|---|---|
Vehicle |
Trace<RailroadVehicle> |
The vehicle that exited the track. |