Hello,
I want to make an AI aircraft (F-16) loop-the-loop on a strict route.
I found that the Waypoint feature by SimDirector does not allow such detailed specifications.
So, using SimConnect, I tried the following procedure, but the AI aircraft vibrates.
Could you tell me the cause and how to improve it?
Here are the steps I took:
(1)First of all, operate the aircraft by yourself, acquire the flight specifications and save them in CSV. (Acquisition frequency is 60Hz)
(2)Next, read the CSV into the memory first, set it in the generated AI aircraft, and forcibly fly it. (Playback frequency is 60Hz)
The items to be acquired by CSV and set to AI aircraft are as follows.
-latitude
-longitude
-altitude
-pitch
-roll
-heading
-knots
I use the following function to generate an AI aircraft.
->simconnect.AICreateNonATCAircraft (containerTitle, tailNumber, init, requestID);
Second, I use the following function for the parameter set to the AI aircraft.
->simconnect_set.SetDataOnSimObject (DEFINITIONS.Position, aiObjId, 0, aiParam);
I wondered if there was a conflict between the AI behavior and the parameter set, so I prepared an AI object assign callback function and described the following, but the result did not change.
simconnect_set.AIReleaseControlEx(data.dwObjectID, EVENTS.AI_RELEASE, true);
simconnect_set.TransmitClientEvent(data.dwObjectID, EVENTS.KEY_FREEZE_LATITUDE_LONGITUDE_TOGGLE, 0, GROUPID.FLAG, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);
simconnect_set.TransmitClientEvent(data.dwObjectID, EVENTS.KEY_FREEZE_ALTITUDE_TOGGLE, 0, GROUPID.FLAG, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);
simconnect_set.TransmitClientEvent(data.dwObjectID, EVENTS.KEY_FREEZE_ATTITUDE_TOGGLE, 0, GROUPID.FLAG, SIMCONNECT_EVENT_FLAG.GROUPID_IS_PRIORITY);
What should I do to improve?
Could you please give your comment?
Thank you.
AI aircraft vibrates.
Re: AI aircraft vibrates.
I am facing same problem these days, did you fixed it?
I am using P3D v4.5.
I am using P3D v4.5.
Re: AI aircraft vibrates.
Kindly anyone from LM team?
-
- Posts: 211
- Joined: Sat Feb 04, 2012 2:41 am
Re: AI aircraft vibrates.
Have you fps set to Maximum Or unlimited.
Try dropping it to a number eg 30, 40 or 60fps.
Try dropping it to a number eg 30, 40 or 60fps.
Re: AI aircraft vibrates.
I have already tried all combinations, usually trying all my code with 30 FPS