frier
09-12-2007 11:28:12
if i dont put my car actor asleep after i create it it causes a crash. Anyone else seen this problem?
Currently im setting it to be asleep just after i create it:
so it works fine, then it wont let me accelerate which is fine because its asleep.. so i wakeUp() the actor in my accelerate() function, then i get a crash when i apply torque to the wheels..
It doesn't crash in debug mode or release mode when i run it through Visual Studio.. But it crashes in release mode when i run the .exe directly. i tried the new nxOgre ( 38 ) and it crashes also.. what am i doing wrong?
Currently im setting it to be asleep just after i create it:
//Create Bug
mBugz[index] = new Player("Player" + index, mMapPlayers[index] , mRenderWindow,
mNxScene,mSoundManager,new NxOgre::CubeShape(2,2,3),
NxOgre::Pose((*itrStartPosition)),tmpBugParams,mMapPlayers.size());
mBugz[index]->putToSleep();
so it works fine, then it wont let me accelerate which is fine because its asleep.. so i wakeUp() the actor in my accelerate() function, then i get a crash when i apply torque to the wheels..
for(Wheels::Iterator i = Drive->items.begin();i != Drive->items.end();++i){
(*i)->setMotorTorque(wheelTorque);
(*i)->setBrakeTorque(mBrake);
}
It doesn't crash in debug mode or release mode when i run it through Visual Studio.. But it crashes in release mode when i run the .exe directly. i tried the new nxOgre ( 38 ) and it crashes also.. what am i doing wrong?