Charlie111
19-06-2008 18:51:30
Hi,
I have some troubles ^^'
Actually, I'm trying to use NxOgre but something is strange for me.
Betajean, in your shortguid you say that we have to use actor, but actor are invisible. So why don't directly use a body ?
Is there any way to create an entity and a sceneNode then add them to a actor/body ?
Thanks
Charlie
(Sorry... newbie's way ^^)
betajaen
19-06-2008 19:05:54
- Actor is an invisible rigid body.
- Body is my class that comes with NxOgre that uses the NxOgre Rendersystem to render something to the screen; usually the Ogre Renderer I wrote; Body inherits from Actor.
Everyone who is anyone writes their own body in their application and adds any user specific parts (sound, AI, logic, etc.)
Charlie111
19-06-2008 19:26:09
Thanks for your answer!
I'm going to look into the RenderSystem.
Have you an advice about it ?
betajaen
19-06-2008 19:46:40
This
page has a pretty good list of pages that deal with the RenderSystem. I wouldn't make your own body class when your new to NxOgre, just a bit after - when you start your serious projects.
Charlie111
19-06-2008 22:39:21
Hum... I tried something using body but I get an error. Can you help me ?
I think something is wrong in my initialisation of Ogre.
It worked with the examples of Ogre but not with my own project.
[....]
PhysXParams Pxp;
Pxp.setToDefault();
Pxp.mTimeController = PhysXParams::TC_OGRE;
World *mWorld = new World(Pxp);
SceneParams Sp;
Sp.setToDefault();
Sp.mRenderer = SceneParams::RN_OGRE;
Sp.mFloor = false;
Sp.mGravity.set(0,-9.8,0);
Scene *mScene = mWorld->createScene("mScene",mSceneManager,Sp);
NodeRenderableParams vp;
vp.setToDefault();
vp.mIdentifier = "bob";
vp.mIdentifierUsage = NodeRenderableParams::IU_Create;
vp.mGraphicsModel = "ninja.mesh";
ActorParams ap;
ap.setToDefault();
ap.mMass = 10;
Body *body = mScene->createBody(vp.mIdentifier, new Cube(1.0f),Vector3::ZERO, vp, ap);
[...]
--> Exception non gérée à 0x00d6dcd6 (NxOgre_d.dll) dans BlackHoles.exe : 0xC0000005: Violation d'accès lors de la lecture de l'emplacement 0xcdcdceb5.
in xtree
_Nodeptr& _Root() const
{ // return root of nonmutable tree
return (_Parent(_Myhead));
}
Heeeeeelllp ^^.
+
betajaen
19-06-2008 23:25:04
The NodeRenderableParams can be tricky, try it using strings:
mWorld = new World("time-controller: ogre");
mScene = mWorld->createScene("myScene", "gravity: yes, renderer: ogre, controller: accumulator");
Body* body = mScene->createBody("Bob;ninja.mesh", new Cube(1.0f), Vector3::ZERO, "mass: 10");
However, the Ninja mesh is a really really horrible mesh to use with NxOgre it's way to big; it's godzilla size.