Need help with Leap and rotation

I have attached my first attempt at using vvvv for a project. I am still getting a grasp on how everything works.

In the attached example, I am trying to represent fingers attached to their respective hand. I want to position the fingers relative to the hand, and I also need to apply the proper rotation transformation to keep the finger’s orientation in the plane with the hand.

I have also noticed that my current implementation shows the hand’s orientation to be about 90 degrees out from where is should be. I’d like to keep the initial axis of the hand the same as view port axis.

I have tried the rotate node without any luck to this point.

Any help or insight is very much appreciated.

Thanks,
Rob.

Leap.v4p (16.3 kB)

to calculate the rotation you need the direction/normal vectors. have a look at the help patch of the Leap node, it should display all the vectors you get from the Leap device.
the node Polar (3d Vector) can convert a direction vector to rotation angles.

I have looked at the Leap node help, thank you for the pointer. There are elements of what I want to accomplish in that help patch.

I have tried some tests using the Polar node. The Polar node only outputs pitch and yaw, but not roll. I am wanting to apply roll to the Box as well.

I am not understanding how to use the Leap’s Direction and Normal vectors to combine them into what I need as a Transform input for the Box. In the example 2 arrows are used to represent roll, pitch and yaw. I’d like to apply that to one object, the Box in my case.

Yo Rob, actually what you need for this is not the Polar node but the LookAt node LookAt

I have attached a patch to this reply which does exactly what you want and maybe more even as it spreads the finger data to create “bones” in the fingers.

Just so you know I am basically working on a complex Leap Motion hack which involves grabbing position and orientation of hand and fingers but also keyTab positions, creating trails of particle on keytabs and also using collada 3d models which rotate and animate according to LEAP data, even modifying general lighting of scene etc… So the attached patch is a much simpler, stripped down version of my patch and the basis of Leap motion hand/finger position + orientation hack. What I am trying to say is I have gone much further and I should be able to help if you also want to get further…For example I developed a little module that BENDS/ROTATES the finger bones and simulates realistically how fingers naturally grip. so that you finger bones are not all STRAIGHT, as normally, when a human bend his finger down he also bends/rotates his finger bones to create a grip… using the INTERVAL node / plug in (available in contributions as a download on this website just do a search for interval animamtion) I was able to do that. So yeah this patch is for you and other as a STARTING POINT TO LEAP MOTION HAND FINGERS POSITION AND ORIENTATION HACK, but please do post in this thread if you want to do more advanced stuff.

Peace from London!.. where there is a certain lack of Mullets, so brothers, let’s rejoice…

LEAP_Hand_fingers_position_orientation.v4p (38.8 kB)

@evvvvil Thanks! This is exactly what I needed to move me forward. Very much appreciated!

The next thing I am going to need help with is collisions and physics. I am trying to get the hand to interact with an object (like a block) and react to being pushed, dropped, picked up, etc.

Eventually this is going to be a AR demo, where the human can interact with live streaming network data.

Cool man sounds like a dope project, happy to help if I can when you get further. I’d say look into the INTERSECT (ex9 Gemoetry MEsh AND ex9 geometry Quad) for ray detection/collision and off course vux’s bullet physics nodes for physics… haven’t played with bullet one so far but looks amazing.

I will flag my reply as a solution so that this thread can be closed. Peace man, if you’re ever in London, let’s go for a beer. Cheers