# ofNode and ofVec3f for tracking

I am using the ofxNi2 addon which conveniently maps skeletal objects as ofNode. Using this, I am trying to get some interesting tracking results such as the angle between left arm and right knee, etc. Since each element is a node, I just say joint.getGlobalPosition which of course returns an ofVec3f- and I am trying to get the angle between two such global positions (ofVec3f hand.angleRad(knee).

But for whatever reason, whether I get degrees or radians of the angle, no matter how I position myself it does not exceed 10 degrees. In short I wanted to know how the angle method works on ofVec3f since there is no extensive documentation on that beyond a line- and I donâ€™t know where to look.

Thanks.

hi. you might have a confusion about how angles are measured. You need 3 points to get an angle out of it. with 2 you just get a single line. It is not an OF specific thing it is just vector math.

In the case of ofVec3f angle method it assumes that the third point is the origin (0,0). so, the value you are getting is the angle between the line that goes from origin to knee and the line from origin to hand.

Thus, if you want to use a different origin you can do as follows:

``````ofVec3f origin(100,100, 100);// whatever value you want.