I am quite new to unity and programming. I am trying to create an expanding gesture with leap motion. Starting position = both palms together like a clap End position = when palms are separated When this occurs I want to move objects to new positions
The code below was creating a gesture where you move both hands up slowly, i wanted to know how i can modify it to have it doing the expand gesture.
void LeapMotion::liftGesture(int numberHands, std::vector palmNormals, std::vector palmVelocities) {
if ((numberHands == 2) &&
(palmNormals[0].x < 0.4f) && (palmNormals[1].x < 0.4f) &&
(palmNormals[0].y > 0.9f) && (palmNormals[1].y > 0.9f) &&
(palmNormals[0].z < 0.4f) && (palmNormals[1].z < 0.4f) &&
(palmVelocities[0].z > 50.0f) && (palmVelocities[1].z > 50.0f) &&
(palmVelocities[0].z < 300.0f) && (palmVelocities[1].z < 300.0f)) {
//MOVE OBJECTS TO NEW POSITIONS
}
}
If someone can please help it would mean alot. Im struggling.