NxOgre + Critter basic problem

lordmonkey

06-04-2011 14:16:54

Hello everyone,
I am new to NxOgre and Critter so please be tolerant :)

I have downloaded and built NxOgre ( buggyswires ) and Critter from repositories (and physx ofc) and I am struggling to get something ( even the simplest thing working with it but I can't. I have tried the tutorials from this site :
http://www.ogre3d.org/tikiwiki/BloodyMess+Tutorial+2

and this one
http://www.ogre3d.org/tikiwiki/NxOgre+T ... =Libraries

but I think there is some kind of big difference between bloddymess and buggyswires so that i can't do the tutorials from bloddymess on buggyswires version.

I need something very simple like this :

mNxWorld = NxOgre::World::createWorld(); //("time-controller:ogre, log:yes");

NxOgre::SceneDescription sceneDesc;
sceneDesc.mGravity = NxOgre::Vec3(0, -9.8f, 0);
sceneDesc.mName = "OgreApp1";
mNxScene = mNxWorld->createScene(sceneDesc);

mNxScene->getMaterial(0)->setStaticFriction(0.5);
mNxScene->getMaterial(0)->setDynamicFriction(0.5);
mNxScene->getMaterial(0)->setRestitution(0.1);

mRenderSystem = new OGRE3DRenderSystem(mNxScene);
NxOgre::ShapeDescription shapeDesc;
NxOgre::Actor* actor1 = mNxScene->createActor(new Cube(1), Vector3(0,5,0), "mass:10");


but :
1) OGRE3DRenderSystem is an error type and I cannot find it anywhere
2)Cube is an error type
3)I cannot find proper createActor function description

any help for a beginner ?

betajaen

06-04-2011 14:45:21

1. Critter::RenderSystem
2. It's BoxDescription (and no new)
3. Use BoxDescription, but you'd want createBody in the RenderSystem.

In short, you should be looking through these:

https://github.com/betajaen/nxogretutor ... uggyswires

lordmonkey

06-04-2011 15:12:24

ok thanks for the reply betajean. One remark for now : I have seen on the forum here that in 1.6 version of nxogre VisualDebugger is disabled and I get this error building these tutorials you showed link for :
'createVisualDebugger' : is not a member of 'Critter::RenderSystem'

Is there any way around it ?
EDIT: I have found this but it does not work :
http://www.ogre3d.org/tikiwiki/NxOgre+T ... =Libraries

class NxOgre::World has no member getPhysXDriver()


And where can I find actual docuemtation (or better : tutorial ) for creating actors in buggyswires ?

betajaen

06-04-2011 15:24:50

VisualDebugger in 1.6 is available and works, same with BuggySwires.

createVisualDebugger is in Critter::RenderSystem, I just checked.

As for the tutorials that link I posted. I assume you want things shown on the screen in that case you want Bodies, if not then Actors. The only real difference between Bloody Mess and Detritus/BuggySwires is Critter and the Shapes API is slightly different, other than that it's the same. And most of Spacegaier's tutorials will apply, the ones that don't - it's normally a few characters different.

lordmonkey

06-04-2011 15:42:23

I was looking for that in there but i cannot find it. I even downloaded new one from this site
https://github.com/betajaen/critter

and there is no function createVisualDebugger in there. (or maybe I am that stupid so that I can't see it)

betajaen

06-04-2011 15:54:11

https://github.com/betajaen/critter/tree/buggyswires

lordmonkey

06-04-2011 17:00:22

Thank you very much. My bad.

Edit: i moved my problem to another topic because it has different nature than this one described in the topic.