Hi,
Hope everyone is enjoying the best of life.
I am using SimConnect API for my project. I have created a camera view by calling SimConnect_CreateCameraInstance for specific AI object and then want to delete this instance, but the function doesn't return any instanceId which is required to pass in the SimConnect_DeleteCameraInstance function. If I pass 0 or requestID which was passed to the function SimConnect_CreateCameraInstance, SimConnect_DeleteCameraInstance doesn't delete the created camera instance. I have searched it in the documentation but couldn't find it.
Anyone from LM team, please guide me as I have searched a lot in the documentation and on the forum as well.
Regards,
Zamirk
What instanceId to pass in SimConnect_DeleteCameraInstance?
Re: What instanceId to pass in SimConnect_DeleteCameraInstance?
Hi LM Team,
Is this documentation error? If so then kindly let me know how to use SIMCONNECT_DELETECAMERAINSTANCE function with SIMCONNECT_CREATECAMERAINSTANCE?
Regards,
Zamirk
Is this documentation error? If so then kindly let me know how to use SIMCONNECT_DELETECAMERAINSTANCE function with SIMCONNECT_CREATECAMERAINSTANCE?
Regards,
Zamirk
Re: What instanceId to pass in SimConnect_DeleteCameraInstance?
Not a documentation error, but certainly an omission. The camera example code doesn't have this either. But, I did figure it out on my own by watching dispatch messages.
The camera instance id is passed to the dispatch proc via a SIMCONNECT_RECV_ID_ASSIGNED_OBJECT_ID message, immediately after SimConnect_CameraCreateInstance is called, as the dwObjectId member variable.
- Bill
The camera instance id is passed to the dispatch proc via a SIMCONNECT_RECV_ID_ASSIGNED_OBJECT_ID message, immediately after SimConnect_CameraCreateInstance is called, as the dwObjectId member variable.
- Bill