241
edits
| No edit summary | No edit summary | ||
| Line 45: | Line 45: | ||
| } | } | ||
| void draw() { | void draw() { | ||
| // periodically ask the captury server to send us data. | |||
| if (millis()-lastMillis>5000) { | |||
|      // The format is as follows: |      // The format is as follows: | ||
|      //"/subscribe/<Actor_name>/<skeleton_data_type>/<joint_name>/<data_format>" |      //"/subscribe/<Actor_name>/<skeleton_data_type>/<joint_name>/<data_format>" | ||
| Line 53: | Line 52: | ||
|      // unfortunately, if you subscribe to too many things, a bug in the captury will lead to malformed OSC-bundles that in turn crash OSCP5 |      // unfortunately, if you subscribe to too many things, a bug in the captury will lead to malformed OSC-bundles that in turn crash OSCP5 | ||
| OscMessage myMessage = new OscMessage("/subscribe/*/blender/Head/vector"); // get positions ("vector") of all joints of actor "felix_braun_rot" in mm | |||
| oscP5.send(myMessage, myRemoteLocation); | |||
| } | |||
|    strokeWeight(4);    |    strokeWeight(4);    | ||
| Line 70: | Line 66: | ||
|      point(joints.get(i).x/5+width/2, joints.get(i).y/5+height/2); |      point(joints.get(i).x/5+width/2, joints.get(i).y/5+height/2); | ||
|      line(random(600), random(600), joints.get(i).x/5+width/2, joints.get(i).y/5+height/2); |      line(random(600), random(600), joints.get(i).x/5+width/2, joints.get(i).y/5+height/2); | ||
| } | |||
| joints.clear(); | |||
| } | } | ||
edits