tertle
13-12-2009 05:54:31
-edit-
Figured out what's wrong: in the reply below.
-----------------------------------------------
Just playing around with nxogre, and this is my code to import my terrain mesh (pretty much taken straight from tutorial)
My landscape mesh is pretty much just a staggered hill with different levels, nothing too complex. I converted it to .nxs using flour.
Now my problem is, it seems to load fine, but when I drop some boxes on it from a height the boxes pass through the top, then about half way towards the ground, they start rolling down an invis hill till they reach the edge and fall off (so the width/length dimensions seem fine.)
I just don't know why it seems to be half the height that it should be. Any advice would be greatly appreciated.
Thanks in advanced.
Figured out what's wrong: in the reply below.
-----------------------------------------------
Just playing around with nxogre, and this is my code to import my terrain mesh (pretty much taken straight from tutorial)
NxOgre::ResourceSystem::getSingleton()->openArchive("media", "file:D:/Documents/Programming/NxOgre/media"); // temp loc
NxOgre::Mesh* triangleMesh = NxOgre::MeshManager::getSingleton()->load("media:Landscape.nxs");
NxOgre::TriangleGeometry* triangleGeometry = new NxOgre::TriangleGeometry(triangleMesh);
mScene->createSceneGeometry(triangleGeometry, NxOgre::Matrix44(NxOgre::Vec3(0, 0, 0)));
Ogre::Entity* triangleEntity = mSceneMgr->createEntity("triangleEntity", "Landscape.mesh");
Ogre::SceneNode* triangleNode = mSceneMgr->getRootSceneNode()->createChildSceneNode();
triangleNode->attachObject(triangleEntity);
triangleNode->setPosition(Vector3(0, 0, 0));
My landscape mesh is pretty much just a staggered hill with different levels, nothing too complex. I converted it to .nxs using flour.
Now my problem is, it seems to load fine, but when I drop some boxes on it from a height the boxes pass through the top, then about half way towards the ground, they start rolling down an invis hill till they reach the edge and fall off (so the width/length dimensions seem fine.)
I just don't know why it seems to be half the height that it should be. Any advice would be greatly appreciated.
Thanks in advanced.