Dibalo
16-04-2007 14:25:45
Hi..
I have very very strange problem... When I try to enable debug mode by calling world::debug(true), it gives me an assertion: Here is what assertion says:
Holy shit! What that means???!! The most confusing this is that debug mode worked a little time ago. A have made only a little changes and it doesn´t work anymore. Unfortunately I don´t remember, what the heck I have done...
Here is how I set the physX (this code is in front of the createScene-method):
I´m using event based input system and when I press F3-button, it calls this method:
I have also created one body after setting the physics with this code (this function is at the end of createScene-method):
I hope I gave you enough information about problem and I cross my fingers that someone could help me with this.
Thank you beforehand!
I have very very strange problem... When I try to enable debug mode by calling world::debug(true), it gives me an assertion: Here is what assertion says:
File: ..\src\OgrePagingLandScapeOctree.cpp
Line: 252
Expression: octantMax.x >= ncenter.x && octantMax.y >= ncenter.y && octantMax.z >= ncenter.z && octantMin.x <= ncenter.x && octantMin.y <= ncenter.y && octantMin.z <= ncenter.z
Holy shit! What that means???!! The most confusing this is that debug mode worked a little time ago. A have made only a little changes and it doesn´t work anymore. Unfortunately I don´t remember, what the heck I have done...
Here is how I set the physX (this code is in front of the createScene-method):
mPhysXworld = new nxOgre::world();
mPhysXscene = mPhysXworld->createScene( "__STTH_PhysXscene__", mSceneMgr );
System::getSingleton().PhysXworld = mPhysXworld;
System::getSingleton().PhysXscene = mPhysXscene;
#ifdef __STTH_Debug__ // this is defined
mPhysXworld->showDebugOverlay( Camera::getSingleton().getOgreCamera(), mWindow );
#endif
#ifdef __DEV_ENABLE_FLOOR_PLANE__ // this is defined
mPhysXscene->hasGravityAndFloor();
Ogre::Plane p( Vector3::UNIT_Y, 0 );
Ogre::MeshManager::getSingleton().createPlane( "__PhysXfloor__", __DEV_RESOURCE_GROUP__,
p, 1500, 1500, 20, 20, true, 1, 5, 5, Vector3::UNIT_Z);
Entity* floor = mSceneMgr->createEntity( "__PhysXfloorEntity__", "__PhysXfloor__" );
mSceneMgr->getRootSceneNode()->createChildSceneNode()->attachObject( floor );
floor->setMaterialName("Developer/__PhysXfloor__");
floor->setCastShadows(false);
#else
mPhysXscene->hasGravity();
#endif
I´m using event based input system and when I press F3-button, it calls this method:
bool FrameListenerBase::showPhysXdebug()
{
nxOgre::world* w = System::getSingletonPtr()->PhysXworld;
w->debug( w->isDebugRendering() ^ 1 );
return true;
}
I have also created one body after setting the physics with this code (this function is at the end of createScene-method):
void _developerSetup()
{
#ifdef __DEV_ENABLE_SETUP_FUNCTION__ // this is defined
System* system = System::getSingletonPtr();
// CHARACTER TESTING 1 /////////
#if __DEV_CHARACTER_TESTING__ == 1 // this is defined
nxOgre::body* b = system->PhysXscene->createBody( "__PhysX_test_body__", "cube.1m.mesh", new nxOgre::cubeShape(5),
1.0f, nxOgre::pose( Vector3(0,15,30), Quaternion( Degree(43),Vector3::UNIT_Z) ) );
b->mNode->scale(5,5,5);
#endif // __DEV_CHARACTER_TESTING__ == 1
#endif // __DEV_ENABLE_SETUP_FUNCTION__
}
I hope I gave you enough information about problem and I cross my fingers that someone could help me with this.
Thank you beforehand!