dbrock
04-12-2007 09:25:19
After calling 'delete mWorld' my game crashes. The html log file says the following:
this is my ground terrain code which works fine:
Am I forgetting to clean something up?
PhysX Error (NXE_INVALID_OPERATION) 'PhysicsSDK::releaseHeightField: instances of this heightfield still exist!' in line 651 of g:\scm\release\PhysX_2.7.2\novodex\SDKs\Physics\src\NpPhysicsSDK.cpp
this is my ground terrain code which works fine:
Ogre::Real terrainHeight = ( mTerrainInfo->getExtents().getMaximum() - mTerrainInfo->getExtents().getMinimum() ).y;
Ogre::Vector3 terrainScale;
terrainScale.x = (float)(1500.0f/129.0f);
terrainScale.z = (float)(1500.0f/129.0f);
Ogre::String stringTerrainScale = "mesh-scale: " + Ogre::StringConverter::toString(terrainScale.x) + " 1 " + Ogre::StringConverter::toString(terrainScale.z);
NxOgre::Actor* terrainActor = mPhysScene->createActor(
"Terrain", // ID
new NxOgre::TerrainShape("../media/ET/ETTerrain.png", terrainHeight, stringTerrainScale), // Shape blueprint
Ogre::Vector3::ZERO, // Pose
"static: yes" // Parameters
);
Am I forgetting to clean something up?