dumbo2007
Crazy about real time sims
Hi,
I am trying to set the velocity of a vessel using the code given in :
http://www.orbiter-forum.com/showthread.php?t=14764
So i use this code in the clbkPreStep() function of the plugin:
VESSELSTATUS2 mystat;
memset(&mystat,0,sizeof(VESSELSTATUS2));
mystat.version = 2;
VESSEL* v = (VESSEL*)(vessel[0].hVessel);
v->GetStatusEx(&mystat);
vessel[] is an array of all vessels in the scenario. But I get an error :
First-chance exception at 0x00482577 in Orbiter.exe: 0xC0000005: Access violation reading location 0x652065bb.
Unhandled exception at 0x00482577 in Orbiter.exe: 0xC0000005: Access violation reading location 0x652065bb.
Is it not allowed to set the vessel velocity from outside the vessel ? I have not reached the setting part yet using DefSetStateEx() as for that GetStatusEx() has to work first.
I am trying to set the velocity of a vessel using the code given in :
http://www.orbiter-forum.com/showthread.php?t=14764
So i use this code in the clbkPreStep() function of the plugin:
VESSELSTATUS2 mystat;
memset(&mystat,0,sizeof(VESSELSTATUS2));
mystat.version = 2;
VESSEL* v = (VESSEL*)(vessel[0].hVessel);
v->GetStatusEx(&mystat);
vessel[] is an array of all vessels in the scenario. But I get an error :
First-chance exception at 0x00482577 in Orbiter.exe: 0xC0000005: Access violation reading location 0x652065bb.
Unhandled exception at 0x00482577 in Orbiter.exe: 0xC0000005: Access violation reading location 0x652065bb.
Is it not allowed to set the vessel velocity from outside the vessel ? I have not reached the setting part yet using DefSetStateEx() as for that GetStatusEx() has to work first.
Last edited: