alejandro
31-05-2007 22:25:17
i want to know ,with what body is my character controler colliding
so i add the body actor to a group
i im using the variable hit , from the class character controler , when it call the function NxControllerAction character::onShapeHit(const NxControllerShapeHit& hit)
i save the hit value in hitt , so it is public
so i my app, i used and i did this :
if (mPlayer->mColision()){
if ( mPlayer->hitt.shape->getActor().getGroup() == 10)
{
// code here
}
}
// in the setup of the scene
NxActorGroup grupo = 10 ;
bodyArbolTrepar->mActor->setGroup( grupo );
the weird thing , is when i add this to the body
bodyArbolTrepar->freezeAll(); , it do not enter to the "if" ,
"(// code here ) "
so , i dont know
the "bodyArbolTrepar" is just a body with a cubeshape
when i delete my terrain and replace with the body, bodyArbolTrepar and chage the dimension , like cubeShape(Vector3(1000,1,1000)); and used frezee it WORKS !!,
but when the character is touching the terrain and also touch the body (tree) , it doesnt work .
any comments will be helpful
i just need know with what is colling my character controller
i am using 0.4 RC3
so i add the body actor to a group
i im using the variable hit , from the class character controler , when it call the function NxControllerAction character::onShapeHit(const NxControllerShapeHit& hit)
i save the hit value in hitt , so it is public
so i my app, i used and i did this :
if (mPlayer->mColision()){
if ( mPlayer->hitt.shape->getActor().getGroup() == 10)
{
// code here
}
}
// in the setup of the scene
NxActorGroup grupo = 10 ;
bodyArbolTrepar->mActor->setGroup( grupo );
the weird thing , is when i add this to the body
bodyArbolTrepar->freezeAll(); , it do not enter to the "if" ,
"(// code here ) "
so , i dont know
the "bodyArbolTrepar" is just a body with a cubeshape
when i delete my terrain and replace with the body, bodyArbolTrepar and chage the dimension , like cubeShape(Vector3(1000,1,1000)); and used frezee it WORKS !!,
but when the character is touching the terrain and also touch the body (tree) , it doesnt work .
any comments will be helpful
i just need know with what is colling my character controller
i am using 0.4 RC3