[Solved] Do I need SimpleTutorial class (0.9)?

Dirso

24-05-2007 13:55:04

Hi,

I work with game states, so I think it would be cleaner if I didn't use Simple Tutorial class?
Can you please post a basic code to create a world based on a mesh terrain without using Simple Tutorial?

Dirso

25-05-2007 02:22:05

Nothing happen when I use this code:

NxOgre::World *_world;
NxOgre::Scene *_scene;
NxOgre::Actor *_terrain;
_world = new NxOgre::World("FrameListener: Yes, log: text");
_scene = _world->createScene("RacingGame", mSceneMgr, "floor: yes, gravity: 0 -9.8 0");

_terrain = _scene->createActor("terrain", new NxOgre::MeshShape("NewLA_track.mesh"),
Vector3(0,-0.05f,0), "static: yes");

betajaen

25-05-2007 02:36:23

Actually it does - A lot.

Your just not setting up the terrain in the Ogre part of your code, if you don't know how to do that; The big button on the top that says "Main Forum" will tell you.

Dirso

25-05-2007 03:03:00

I actually made a few things in Ogre, I was using this code and it at least show me the terrain. I think I missed something with NxOgre - that's why I posted the question here. Sorry if I'm wrong :(

_ground = mSceneMgr->getRootSceneNode()->createChildSceneNode();
_groundEnt = mSceneMgr->createEntity("ground", "NewLA_track.mesh");
_ground->attachObject(_groundEnt);


Thanks again,
Dirso

Dirso

25-05-2007 13:05:23

I would really appreciate if you could post a small sample code for creating the world geometry with NxOgre.

Thanks,
Dirso

betajaen

25-05-2007 13:53:58

It is exactly the same how it's done the Ogre Terrain demo.