Tibo6
15-07-2010 16:53:48
Hello
I saw that there is a code snippet in this forum which shows how to get a callback when a body collide an other body which is specified.
I would like to do the same thing, but this time, with a body which collide an other that we don't know. In fact, I want a function that be called when a body collide something in the world.
Thanks.
Bye.
Tibo6
16-07-2010 17:48:14
In fact, I have missiles, and I want them to be destroyed when they encounter something.
betajaen
16-07-2010 18:19:22
Probably the same code, which meaning you would have to pair up the collisions with the missiles with anything you might think it would hit.
The alternative way is group/group collision callbacks, but honestly I can't remember if I wrote the wrapping code for that.
Tibo6
16-07-2010 18:41:47
The alternative way is group/group collision callbacks, but honestly I can't remember if I wrote the wrapping code for that.
It's hard
The alternative way is group/group collision callbacks, but honestly I can't remember if I wrote the wrapping code for that.
We can affect a group number to a body.
But there is no equivalent to groups than NxOgre::Scene::setActorFlags. There is NxOgre::Scene::setGroupCollisionFlag but apparently seeing the last parameter it is usefull only to disable collisions.
Tibo6
21-07-2010 13:05:46
I found this code but two functions are missing :
mScene->getScene()->setGroupCollisionFlag( 1, 1, true );
mScene->getScene()->setActorGroupPairFlags( 1, 1, NX_NOTIFY_ON_START_TOUCH|NX_NOTIFY_ON_TOUCH|NX_NOTIFY_ON_END_TOUCH );
mScene->getScene()->setUserContactReport( this );