387
edits
(→Step4) |
(→Step4) |
||
(14 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
The following script I will provide contains the whole setup you need to recieve data from '''The Captury''' and constantly updating it in '''Unity''' | The following script I will provide contains the whole setup you need to recieve data from '''The Captury''' and constantly updating it in '''Unity''' | ||
<br> | |||
<br> | |||
Here is the File: [[Media:osc_script.zip|OSC_Reciever.js]] | |||
==IMPORTANT== | |||
Be aware that the '''OSC''' and the '''UDPPacketIO''' Scripts are in the Folder called '''Plugin'''<br>Also be sure to not have the Scripts twice in the Unity '''Assets''' Folder.<br><br> | |||
Create an Empty GameObject were you put all ''three'' Scripts in and call it as you like e.g. '''OSCHandler'''. | |||
<br> | <br> | ||
===Step1=== | ===Step1=== | ||
Line 19: | Line 27: | ||
<br> | <br> | ||
The '''gameReciever''' variables is where you can drop your 3d object in later. You can define as many as you want. | The '''gameReciever''' variables is where you can drop your 3d object in later. You can define as many as you want. | ||
<br> | |||
<br> | |||
The '''controller''' variable isn't important for us. Don't confound it with the gameReciever tab in your editor. | |||
<br> | <br> | ||
<br> | <br> | ||
Line 37: | Line 48: | ||
<br> | <br> | ||
[[File:oscreciever3_new.png]] | [[File:oscreciever3_new.png]] | ||
<br> | |||
<br> | |||
The '''OnDisable''' function will close the UDP sockets of the listener | |||
<br> | |||
<br> | |||
[[File:oscreciever6_new.png]] | |||
===Step4=== | ===Step4=== | ||
This | This are our Update Functions: | ||
<br> | <br> | ||
All values which will be parsed from Step5 will be constantly updated here. | All values which will be parsed from Step5 will be constantly updated here. | ||
Line 51: | Line 68: | ||
<br> | <br> | ||
<br> | <br> | ||
'''NOTICE''': | '''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) | ||
<br> | <br> | ||
<br> | <br> | ||
[[File:oscreciever4_new.png]] | [[File:oscreciever4_new.png]] | ||
<br> | |||
<br> | |||
[[File:oscreciever5_new.png]] | [[File:oscreciever5_new.png]] | ||
Line 63: | Line 82: | ||
<br> | <br> | ||
<br> | <br> | ||
[[File: | [[File:oscreciever10_new.png]] |
edits