- Messages
- 2
- Country
Hi,
I created an airplane (and it works well):
simconnect.AICreateNonATCAircraft(craft.Mypaint, craft.callsign, craft.InitPos, DEFINITIONS.CreateAi);
i got it id (MyPlaneId),
then i tried to move it (on ground):
SIMCONNECT_DATA_WAYPOINT[] wp = new SIMCONNECT_DATA_WAYPOINT[1];
wp[0].Altitude = MessagePumpManager.altitude;
wp[0].Latitude = NewFi;
wp[0].Longitude = NewLa;
wp[0].ktsSpeed = 40;
wp[0].percentThrottle = 70;
wp[0].Flags = (uint)(SIMCONNECT_WAYPOINT_FLAGS.SPEED_REQUESTED);
Object[] objv = new Object[1];
wp.CopyTo(objv, 0);
simconnect.SetDataOnSimObject(DEFINITIONS.DATAAI, MyPlaneId, SIMCONNECT_DATA_SET_FLAG.DEFAULT, objv);
and it does not lead to anything, the plane does not move, what am I doing wrong?
(in FSX, this code worked fine)
thanks in advance for your answer.
UPD: the question is cleared, the problem was in the model
I created an airplane (and it works well):
simconnect.AICreateNonATCAircraft(craft.Mypaint, craft.callsign, craft.InitPos, DEFINITIONS.CreateAi);
i got it id (MyPlaneId),
then i tried to move it (on ground):
SIMCONNECT_DATA_WAYPOINT[] wp = new SIMCONNECT_DATA_WAYPOINT[1];
wp[0].Altitude = MessagePumpManager.altitude;
wp[0].Latitude = NewFi;
wp[0].Longitude = NewLa;
wp[0].ktsSpeed = 40;
wp[0].percentThrottle = 70;
wp[0].Flags = (uint)(SIMCONNECT_WAYPOINT_FLAGS.SPEED_REQUESTED);
Object[] objv = new Object[1];
wp.CopyTo(objv, 0);
simconnect.SetDataOnSimObject(DEFINITIONS.DATAAI, MyPlaneId, SIMCONNECT_DATA_SET_FLAG.DEFAULT, objv);
and it does not lead to anything, the plane does not move, what am I doing wrong?
(in FSX, this code worked fine)
thanks in advance for your answer.
UPD: the question is cleared, the problem was in the model
Last edited: