Hello, I am attempting to isolate the coordinate components so that I can work with the x, y and z values independently.
The current end goal would be have something that gives an output like
"X-coordinate of the Index finger tip is:___"
"Y-coordinate of the Index finger tip is:___"
"Z-coordinate of the Index finger tip is:___"
I have struggled to find anything in the V3 documentation and anything in the forums.
This is my current section of working code
public class TipPos extends Listener {
JLabel IndexLabel;
JFrame Frame;
TipPos(JFrame frame,JLabel Label){
IndexLabel = Label;
Frame = frame;
}
public void onFrame(Controller controller) {
Frame frame = controller.frame();
for (Finger f : frame.fingers()) {
if (f.type() == Type.TYPE_INDEX) {
Vector fingerPos = f.stabilizedTipPosition();
InteractionBox box = frame.interactionBox();
fingerPos = box.normalizePoint(fingerPos);
IndexLabel.setText("The Co-ordinates are " + fingerPos.toString());
Frame.setVisible(true);
System.out.println(fingerPos.toString());
}
}
}
}