my character doesn't seem to be colliding with house...

calvslan

15-01-2011 10:45:00

my character doesn't seem to be colliding with house....... i'm korean so i can't speak english well

characterBody= new OgreBulletDynamics::RigidBody("what", mWorld);

characterBody->setShape( mChara->mBodyNode,
characterBoxShape,
0.1f, // dynamic body restitution
0.5f, // dynamic body friction
0.5f, // dynamic bodymass
boxStartPosition, // starting position of the box
Quaternion::IDENTITY);// orientation of the box


characterBody->enableActiveState();
characterBody->setKinematicObject(true);
characterBody->disableDeactivation();

OgreBulletDynamics::RigidBody *defaultBody11 = new OgreBulletDynamics::RigidBody("house", mWorld);
defaultBody11->setStaticShape(nodee4, sceneBoxShape11, 1.0, 0.8, position1);


what am i suppose to do? -_-
what can i do?

help me, please

jonathanblacknight

17-01-2011 11:25:16

I think if you have a Kinematic object, you will handle with the collisions


characterBody->enableActiveState();
characterBody->setKinematicObject(true);
characterBody->disableDeactivation();


Try the same, without this code.

calvslan

18-01-2011 05:54:07

thank you for your help

new problem :?



characterBody2->setStaticShape(mChara2->mBodyNode, characterBoxShape2, 0.1, 0.8, boxStartPosition);


btRigidBody* btr = characterBody2->getBulletRigidBody();
btr->setActivationState(DISABLE_DEACTIVATION);

Quaternion myq = characterBody2->getSceneNode()->getOrientation();
Vector3 myp = characterBody2->getSceneNode()->getPosition();

btr->setWorldTransform(btTransform(btQuaternion(myq.x, myq.y, myq.z, myq.w),
btVector3(myp.x, myp.y, myp.z)));


it doesn't collting any other.........

help me;;
why it doesn't colling?

jonathanblacknight

18-01-2011 16:29:41

Try to turn on the debug shape, and verify if the collision shape are exactly where you want