Create an "Aircraft" using PDK

zillmer
Posts: 6
Joined: Wed Jan 03, 2018 4:57 pm

Create an "Aircraft" using PDK

Postby zillmer » Sat Dec 14, 2019 10:24 pm

So I'm trying to figure out how, or if, it is possible to create an object directly using the PDK that is then recognised and controllable as an AI aircraft.

I have existing code which uses the SimConnect_AICreateNonATCAircraft call to create an aircraft. Once the aircraft is created, I can obtain an IBaseObject pointer to the aircraft using GetSimObjectManager()->GetObject(), and then use the TriggerProperty method to control aspects of the aircraft, such as the lights, gear position and so forth.

However if I create the object directly using the ISimObjectManager::CreateObject() function, whilst the object is rendered in the sim correctly, and the position can be updated, the created object does not respond to any of the TriggerProperty calls.

Is there something I can do so that the object created using CreateObject is recognised as an AI aircraft, rather than just a generic object?

Regards

Simon.

Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 1 guest