- Messages
- 1,040
- Country

I have an ground vehicle object to which I set a waypoint drive plan (I won't call it a flight plan
), using the same method as in AIObjects sample. All works well. Now, I'd like to clear the drive plan, and stop the vehicle where it was along the drive plan when I cleared the waypoints. So, to add waypoints, I use:
(which works no problem)
and to clear the drive path, I use:
... and this DOES NOT work. The vehicle keeps moving along the old convoy route. I would have expected (and I read somewhere on this forum) that the above line would clear the waypoint flight (drive) plan.
Does anyone know how to clear the waypoint plan? I was at least expecting the vehicle keep moving in the straight line after the waypoints are cleared, but no, it still follows them as if they were not cleared.
Any idea on how to do this?
Code:
vector<SIMCONNECT_DATA_WAYPOINT> Path;
...
SimConnect_SetDataOnSimObject(hSimConnect, DEFINITION_WAYPOINT, ObjectID, 0, (DWORD)(Path.size()), (DWORD)sizeof(Path[0]), Path.data());
(which works no problem)
and to clear the drive path, I use:
Code:
SimConnect_SetDataOnSimObject(hSimConnect, DEFINITION_WAYPOINT, ObjectID, 0, 0, 0, NULL);
... and this DOES NOT work. The vehicle keeps moving along the old convoy route. I would have expected (and I read somewhere on this forum) that the above line would clear the waypoint flight (drive) plan.
Does anyone know how to clear the waypoint plan? I was at least expecting the vehicle keep moving in the straight line after the waypoints are cleared, but no, it still follows them as if they were not cleared.
Any idea on how to do this?
Last edited:

sessions, I managed to figure out how to stop the vehicle without re-spawning it. Basically, insert a new single waypoint close to it, with speed and rpm set at zero (along with both flags for those params). The vehicle will try to reach that point at zero speed and rpm, which will effectively stop it.