Quantcast
Channel: Programming (In-game)
Viewing all articles
Browse latest Browse all 903

[solved]Get direction to waypoint

$
0
0
Hi
I have a long, straight line of blocks (a monorail track) and a few gps waypoints (stations) along it. I have a cab on the track which can go forward or backward (no turning) How can i determine a given waypoint is in which direction? I tried this:

Code:
NextStation = MyConfig.StationList[NextStopIndex];
Vector3 StationInRCCubeGrid = RemoteControl.CubeGrid.WorldToGridInteger(NextStation.GetCoords()); 
TargetDirection =...
[solved]Get direction to waypoint

Viewing all articles
Browse latest Browse all 903

Trending Articles