dreamig
23-05-2013 10:00:37
Hi,
i have skeleton , that has of course bones
i create cylinder with ogreprocedural
and i want to detect if the hands boen touch the node or no
[attachment=0]boun.jpg[/attachment]
i calculate the distance between the hand bone and the nodes
like that
but it seem do not work
have you another idea to test if the hand are in contact with the cylinder ?
i don't want use physics just test approximately
i have skeleton , that has of course bones
i create cylinder with ogreprocedural
Procedural::CylinderGenerator().setRadius(35).setHeight(116).realizeMesh("sphereMesh1");
Ogre::Entity* entitySphere1 = mSceneMgr->createEntity("sphereMesh1");
nodde1=mSceneMgr->getRootSceneNode()->createChildSceneNode("iam1");
nodde1->attachObject(entitySphere1);
material = Ogre::MaterialManager::getSingleton().create( "entobst1","General");
material->getTechnique( 0 )->getPass( 0 )->setAmbient(1,1,0);
entitySphere1->setMaterial(material);
nodde1->setPosition(-160,10,101);
entitySphere1->getBoundingBox();
nodde1->showBoundingBox(true);
and i want to detect if the hands boen touch the node or no
[attachment=0]boun.jpg[/attachment]
i calculate the distance between the hand bone and the nodes
like that
Ogre::Vector3 dd= skel1->getBone("RightHand_1")->_getDerivedPosition()-(nodde1->getPosition());
but it seem do not work
have you another idea to test if the hand are in contact with the cylinder ?
i don't want use physics just test approximately