RoxXx88
03-04-2012 17:19:08
Hi!
I'm new to NxOgre, and I've started with betajean's tutorial...
I've created a new project with Ogre AppWizard, and I've tried to use the code of the first tutorial (101.h).
It seems to work well, but I can't see cube.1m.mesh.
This is the setupPhysics() function:
I call this function after the mSceneMgr initialization. Where is the problem?
I'm new to NxOgre, and I've started with betajean's tutorial...
I've created a new project with Ogre AppWizard, and I've tried to use the code of the first tutorial (101.h).
It seems to work well, but I can't see cube.1m.mesh.
This is the setupPhysics() function:
// Create the world
mWorld = NxOgre::World::createWorld();
mWorld->getRemoteDebugger()->connect();
// Create the scene
NxOgre::SceneDescription sceneDescription;
sceneDescription.mGravity = NxOgre::Constants::MEAN_EARTH_GRAVITY;
sceneDescription.mUseHardware = false;
mScene = mWorld->createScene(sceneDescription);
// Set default material properties
mDefaultMaterial = mScene->getMaterial(0);
mDefaultMaterial->setRestitution(0.1f);
mDefaultMaterial->setStaticFriction(0.5f);
mDefaultMaterial->setDynamicFriction(0.9f);
// Plane creation
mScene->createSceneGeometry(NxOgre::PlaneGeometryDescription());
// Create the rendersystem
mRenderSystem = new Critter::RenderSystem(mScene, mSceneMgr);
//NxOgre::MeshManager* mMeshManager = NxOgre::MeshManager::getSingleton();
//mBarrelMesh = mMeshManager->load("ogre://General/barrel.nxs", "barrel");
// Setup a BodyDescription
Critter::BodyDescription bodyDescription;
bodyDescription.mMass = 40.0f; // Set the mass to 40kg
// Finally create the body
mBody = mRenderSystem->createBody(NxOgre::BoxDescription(1, 1, 1), NxOgre::Vec3(10,5,0), "cube.1m.mesh",
bodyDescription);
I call this function after the mSceneMgr initialization. Where is the problem?