The following script I will provide contains the whole setup you need to recieve data from The Captury and constantly updating it in Unity
Here is the File: OSC_Reciever.js
Be aware that the OSC[[OSC|Open Sound Control]] and the UDPPacketIO Scripts are in the Folder called Plugin
Also be sure to not have the Scripts twice in the Unity Assets Folder.
Create an Empty GameObject were you put all three Scripts in and call it as you like e.g. OSCHandler.
In RemoteIP we set our connection for example to the sever we want to recieve the messages from or we can test it locally:
The Captury: kosmos.medien.uni-weimar.de
SendToPort: is where we type in the UDP Port set in The Captury. Actually it's -- 1065 --
ListenerPort: can also be 1065.
The gameReciever variables is where you can drop your 3d object in later. You can define as many as you want.
The controller variable isn't important for us. Don't confound it with the gameReciever tab in your editor.
This is our Update Function:
All values which will be parsed from Step5 will be constantly updated here.
We can now chose even if we want the objects to be transformed or rotated or whatever.
The Time.frameCount will constantly resubscribe every 60 frames. The first value means the framrate the last one the scale factor.
Subscription: instead of the Root you can use any bone described in The Captury. E.g.: Left_Arm
NOTICE: yourname etc. is just set up in the Script for comprehension. Please replace it with the name you set up in The Captury.(User_Green_Socket)
In our last step we define which values we want from the captury to parse them in the update function.
Also be aware to change the name of "Person_One" to the one you use in The Captury as mentioned above.