Page 1 of 1
Posted: Fri Jul 15, 2016 4:01 am
I am using SimConnect_SetDataOnSimObject after creation of some aircrafts through SimConnect_AICreateNonATCAircraft. And i am continuously using SIMCONNECT_DATA_INITPOSITION structure to set its parameters every half a second. Learning Center says one must not use this structure to continuously set data through this structure as P3D tries to initiate somethings for terrain system. If so, then which structure should I have to use.
Thanks for your precious time.
Posted: Fri Jul 15, 2016 12:13 pm
Can I ask why you are trying to do that? Could you not just set a waypoint and then "let" the aircraft fly to the next position.
Or you could look into the body velocity X,Y Z, but then that's like writing your own flight dynamics engine.
Posted: Tue Jul 19, 2016 6:36 am
In fact, I am writing a module which will interact different flight simulators with each other that is why I have to do that.
Setting the position of aircraft could be multiple times in a second, so I can't use waypoint setting approach. Is there any way to do that.
Posted: Tue Jul 19, 2016 6:39 am
Same is the case for munitions and when I set Weapon position through this approach, weapon disappears but aircraft doesn't disappear through this approach. Please, guide me about this.
Posted: Tue Jul 19, 2016 12:59 pm
Look into the velocity body X,Y Z in the Simulation variables section of the Utilities/Variables area in the SDK. I have not coded this, but would assume you would use SetDataonSimObject. See the throttle example.
The are other variables like acceleration and rotation. But this means setting up your own flight dynamics engine, based on what you want to do.
Posted: Wed Jul 20, 2016 3:24 pm
Thanks for your guidelines. I Will give it a try IA!
Posted: Mon Aug 01, 2016 7:28 pm
I'd recommend taking a look at the SimObject API (ISimObjects). That PDK capability was specifically created for use cases similar to the one you describe. There are a couple examples included in the SDK.
Posted: Mon Sep 05, 2016 10:38 am
i am trying to use SimObject API, i compiled Missile SimObject Sample in Visual Studio 2013 and place Missile.dll in gauges/Missile.dll and also update dll.xml with new load Missile.dll addone, when i run prepar3d.exe its crashes on load Missile.dll, i don't know why because when i compile Missile sample project its succeeded.
So, how i debug this problem?