P3D Hangs When Missile Speed is Zero--SimObjectAPI

For topics related to the creation of simulation objects (SimObjects). This includes development of aircraft, ground, and maritime vehicles.
Locked
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

P3D Hangs When Missile Speed is Zero--SimObjectAPI

Post by zamirk »

hi,

I am working on SimObject Api, i am using Missile SimObject Sample and control its speed according to my requirements, my problem is that when missile speed reaches to zero Prepar3d hangs and not responding and its frame rate going to zero,
i also using Destroy() function of Missile Object when missile speed become zero but its not working.
So how i can handle this problem?

Any one from LM..!!

Thanks
Mike Schroeter
Lockheed Martin
Posts: 341
Joined: Thu Jan 12, 2012 7:05 pm

Re: P3D Hangs When Missile Speed is Zero--SimObjectAPI

Post by Mike Schroeter »

It's not clear if you are implying that problem is a result of zero speed or the Destroy() call. My guess would be the latter, which marks the object for destruction. Make sure you are cleaning up your references on that object, as it sounds like there may be calls being made on the object after it is destructed.

Keep in mind that samples such as this are provided to simply demonstrate the SDK API, and should not be expected to be released as robust releasable code. You are welcome to use the code as a starting point, but it is not supported as a deploy-able feature.

Hope this helps,
Mike
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Re: P3D Hangs When Missile Speed is Zero--SimObjectAPI

Post by zamirk »

hi Mike,

thanks, sorry i was busy so did not post reply,
let me check that all references are release completely in my code.

yes i know its sample code its not complete code but sample code should have complete documentation and proper workable code, because i found some mistakes in that sample code which i already posted on your forum.
but any way let me check, and than contact you.

Thanks
zamirk
Posts: 132
Joined: Mon Jul 21, 2014 8:39 am

Re: P3D Hangs When Missile Speed is Zero--SimObjectAPI

Post by zamirk »

i have another problem,that in SimObject API Missile Sample code, i am checking collision detection of missile with other objects (targets), i detect collision successfully but now i want to call WEAPON_DETONATED_EVENT in another simconnect application? how i can achieve this?

i found this

Code: Select all

SimConnect_ReaportWeaponDamaged(g_hSimConnect, WeaponDamageData);
code, and i already handle WEAPON_DETONATED_EVENT in another simconnect application but i did not receive event when weapon collide with objects?
Is there any way you can help me?

Thanks
Locked