Hi Joe_Ward
First of all thank you for your fast answer, I have the problem with all fingers. I think that i need a lock before writting, because in the code that is below, Leap motion recognise my finger/s and it works fine but in this case i need to interact with the keyboard. I have to press any key from keyboard at the same time that Leap detects my fingers to get the action.
Do you think that I need a lock before or maybe is a thread problem? If i need a lock, how i can do it?
[
bool AppManager::OISListener::keyPressed( const OIS::KeyEvent &arg)
{
Leap::Controller controller;
Leap::Frame frame = controller.frame();
setObjectName(QString::number(frame.id()));
const Hand hand = frame.hands()[0];
const FingerList fingers = hand.fingers();
if(frame.fingers().count() == ' any_num' )
{
if( mParent->planeNode->getPosition()[0]!=1000)
{
mParent->planeNode->setVisible(false);
mParent->planeNode->setPosition(Ogre::Vector3(1000,0,0));
}
if(mParent->scaleValueVp_==100)
{
mParent->scaleValueVp_=-0.5;
mParent->miniScreen_->setCorners(-1.0f,1.0f,mParent->scaleValueVp_,-mParent->scaleValueVp_);
}
else
{
mParent->scaleValueVp_=100;
mParent->miniScreen_->setCorners(-1.0f,1.0f,-1.0f,1.0f);
}
}
return true;
}]
Alberto