gugus
08-12-2007 14:39:37
Hello.I am trying ActorsGroups callbacks with the new version of NxOgre,and it doesn't work.
Here is my code(it was working fine with NxOgre 0.9)
and
onTouch,etc are not called and i am sure of it since it exit the application when it's call.
Ps:
This doesn't seems to be implemented and this
Here is my code(it was working fine with NxOgre 0.9)
mWorld = new NxOgre::World("FrameListener: Yes, log: html");
NxOgre::Scene* mScene;// = mWorld->createScene("Paris", pSceneManager, "gravity: yes, floor: yes");
mScene = mWorld->createScene("Main", "gravity: yes, floor: yes, controller: accumulator, renderer: ogre, rendererUserData: pSceneManager");
NxOgre::ActorGroup* mGroup = mScene->createActorGroup("1");
NxOgre::ActorGroup* mGroup2 = mScene->createActorGroup("2");
//creation d’une entitée PHYSIQUE
Ogre::Entity* entity = pSceneManager->createEntity("Hello", "OgreHead.mesh");
mScene->createBody("Rien1", new NxOgre::CubeShape(10,10,10), Ogre::Vector3(0,15, 0), "model: Hello, model-type: reference", "mass: 20 ,Group: 1");
Ogre::Entity* entity2 = pSceneManager->createEntity("Hello2", "OgreHead.mesh");
mScene->createBody("Rien2", new NxOgre::CubeShape(10,10,10), Ogre::Vector3(0,30, 0), "model: Hello2, model-type: reference", "mass: 20 ,Group: 2");
myContactReporter* mReporter = new myContactReporter();
mReporter->mScene = mScene;
mReporter->app = this;
mGroup->setCallback(mReporter,false);
mGroup->setCollisionCallback(mGroup2, NX_NOTIFY_ALL, true);
and
class myContactReporter : public NxOgre::GroupCallback::InheritedCallback
{
public:
void onTouch(NxOgre::Actor* a, NxOgre::Actor* b);
void onStartTouch(NxOgre::Actor* a, NxOgre::Actor* b);
void onEndTouch(NxOgre::Actor* a, NxOgre::Actor* b);
NxOgre::Scene* mScene;
Application* app;
};
onTouch,etc are not called and i am sure of it since it exit the application when it's call.
Ps:
mGroup->setCallback<myContactReporter>(mReporter,&myContactReporter::onEndTouch,&myContactReporter::onEndTouch,&myContactReporter::onEndTouch,true);
This doesn't seems to be implemented and this
NxOgre::Body* mBody2 = mScene->createBody("OgreHead.mesh", new NxOgre::CubeShape(10.5), Ogre::Vector3(0,20,0), "Mass: 50,Group: 1");
is not working for me.