otaku19
02-03-2008 05:47:41
Hello again....
Firts excuse my english, i am very bad written.
I am working on academic project with nxogre and falcon.
i am movint a kinematic object around the world with the falcon cordinates.
but I don't know to feedback the force to the haptic when collision with some object
I have this code for the ball
and this is the code for the haptic representation
i am currenly detecting the collision with the wall.
but i need calcule the force with the haptic hit the ball or vice.
some body know, how can I calcule this???
THX
Firts excuse my english, i am very bad written.
I am working on academic project with nxogre and falcon.
i am movint a kinematic object around the world with the falcon cordinates.
but I don't know to feedback the force to the haptic when collision with some object
I have this code for the ball
NxOgre::SphereShape* shapeBall = new NxOgre::SphereShape(2,"CCDDynamicFlag: true, generateCCD; yes");
NxOgre::Material* materialBall = mScene->createMaterial("MaterialBall");
materialBall->setRestitution(1);
materialBall->setDynamicFriction(0.5);
materialBall->setStaticFriction(0.5);
shapeBall->mParams.mMaterialAsIndex = materialBall->getMaterialIndex();
Bodyball = mScene->createBody("sphere.2m.mesh",shapeBall,NxOgre::Pose(Ogre::Vector3(0,50,0)),"mass: 10" );
Bodyball->getEntity()->setCastShadows(true);
Bodyball->setLinearDamping(0.01);
Bodyball->setAngularDamping(0.01);
and this is the code for the haptic representation
//Haptic representation
haptic = mScene->createBody("plato jug 1.mesh",new NxOgre::CubeShape(3,3,0.2),NxOgre::Pose(Ogre::Quaternion(-0.49999991,-0.49999994,0.5,-0.50000006)),"mass: 1, kinematic: yes, node-scale: 1.222525 1.222525 1.222525");
haptic->getEntity()->setCastShadows(true);
boundingBox = haptic->getEntity()->getBoundingBox();
i am currenly detecting the collision with the wall.
but i need calcule the force with the haptic hit the ball or vice.
some body know, how can I calcule this???
THX