Lag/poor station-keeping with AttachSimObjectToSimObject

Discuss on the SimConnect SDK can be used by programmers to write add-on components for Prepar3D
Post Reply
lequinne
Posts: 14
Joined: Thu Jun 08, 2017 7:58 pm

Lag/poor station-keeping with AttachSimObjectToSimObject

Post by lequinne »

I am attaching 40 or so airplanes to the deck of an AI aircraft carrier using SimConnect_AttachSimObjectToSimObject(). It works reasonably well, however the planes appear to oscillate up and down considerably (in perfect unison) as the deck pitches and rolls - they are not in sync with the deck of the ship, and appear either to be lagging, or just not quite moving correctly. As the deck motion increases, it gets worse - up to maybe 1.5 meters. I read in another thread that there was a lag in the attachment system which was fixed in v4.5, however I just updated to v4.5 and am still having this issue. I can send a video if it would be helpful. Other information which may be relevant: all of the carriers motion is driven through the "slew" APIs, for various reasons. However the aircraft are not in slew mode and I'm not freezing them or sending any other simconnect values/commands to them.

Thanks,
Farley
autom
Posts: 2
Joined: Fri Aug 08, 2014 1:06 pm

Re: Lag/poor station-keeping with AttachSimObjectToSimObject

Post by autom »

I also have synchronization issues in P3D 4.5. But in V4. 4 everything was normal. Use a pair of SimConnect_AICreateSimulatedObject initialization and SimConnect_AttachSimObjectToSimObject in DispatchProc. I apologize for my English.https://youtu.be/edLdCPEl1k0
User avatar
Rob McCarthy
Lockheed Martin
Posts: 3703
Joined: Wed Aug 24, 2011 1:37 pm

Re: Lag/poor station-keeping with AttachSimObjectToSimObject

Post by Rob McCarthy »

Thanks for the reports. We'll investigate this and get back to you.

Regards,
Rob McCarthy
Rob McCarthy
Prepar3D® Core Lead
autom
Posts: 2
Joined: Fri Aug 08, 2014 1:06 pm

Re: Lag/poor station-keeping with AttachSimObjectToSimObject

Post by autom »

Thanks, Rob. Just in case I'll show You how it looks in P3Dv4.4. Here I use a pair of SimConnect_AttachObjectToSimObject and SimConnect_AttachSimObjectToSimObject. https://youtu.be/pS7ECS10ynw

If I only use SimConnect_AttachObjectToSimObject, then the object connects to the internal view and is displayed on top of everything else. When you call additionally SimConnect_AttachSimObjectToSimObject, the object starts using Z-Buffer, and displays correctly.
Post Reply