Terrain don't show

Felipe

19-08-2007 03:29:49

my code:

#include "Ogre.h"
#include "NxOgre.h"
#include "Cake.h"

using namespace NxOgre;
using namespace Ogre;
using namespace std;

class Sponge_Cake : public Cake {

public:


World* mWorld;
Scene* mScene;

void start() {

mWorld = new World("log: html");
mScene = mWorld->createScene("Main", mSceneMgr, "gravity: yes, floor: yes");
mSceneMgr->setAmbientLight(ColourValue(1, 1, 1));
mScene->createBody("cube.1m.mesh", new CubeShape(1), Vector3(0,2.5f,0), "mass: 10");
mScene->createActor("terrain",new NxOgre::TerrainShape("terrain.png", 100, "mesh-scale: 2 1 2"),Vector3::ZERO,"static: yes");
}

//////////////////////////////////////////////////////////////////////////////////////////////////

void stop() {
delete mWorld;
}

//////////////////////////////////////////////////////////////////////////////////////////////////

void onFrame(float deltaTime) {

// Want a key pressed?
//
// if (mInputHandler->isKeyDown(Action::OPTION_1)) {
// ...
// }
//
// Search the solution for "#KEYCONFIG" to find the key configuration.


}

//////////////////////////////////////////////////////////////////////////////////////////////////

BakeMyCake();

};

Hey_Cut_Me_Slice_Of(Sponge_Cake)

kenny.bsp

19-08-2007 10:06:00

Never used it .. but my guess would be, that you have only created a phys representation of terrain, not the renderable part of it.
If I'm right, then look at Demo_Terrain or whatever it's name is to see how ogre handles terrain.

betajaen

19-08-2007 11:06:46

Yep. Kenny.bsp gets a gold star.