spring - week 2
Plan for using OSC Plugin with Unreal Engine
Step 1 — Enable the OSC Plugin in UE5
Open your project → Edit → Plugins
Search OSC → check the box → restart the editor
That's it — no C++ needed, it's fully Blueprint-accessible
Step 2 — Create the OSC Server (Blueprint)
Open your GameMode, PlayerController, or a dedicated BP_OSCManager actor. In Event BeginPlay:
Drag off and call Create OSC Server
Server Address: 0.0.0.0 (listen on all interfaces)
Port: 7000
Promote the return value to a variable — call it OSCServer
Call OSC Server Listen → plug in OSCServer
Step 3 — Bind Address Patterns
Rather than checking every message manually, bind specific patterns so UE auto-routes them:
Call OSC Server Bind Address Pattern
OSC Server: your OSCServer variable
Address Pattern: /hand/index/x
Creates a delegate — right-click → Create Event → Create Matching Function
Repeat for each channel you need (/hand/index/y, /hand/pinch, etc.)
Inside each bound function:
On OSC Message Received (Message, IPAddress)
→ Get OSC Message Float Array (Message)
→ Get (Index 0) from array
→ Set your target variable / call Set Actor LocationStep 4 — TouchDesigner OSC Out Setup
In your TD network:
Add an OSC Out CHOP after your MediaPipe CHOP
Set:
Network Address: 127.0.0.1
Port: 7000
Protocol: UDP
Under the OSC tab, map each channel to an address:
Channel tx → /hand/index/x
Channel ty → /hand/index/y
Channel pinch → /hand/pinch
TD sends one packet per cook — at 60fps that's 60 UDP packets/sec per channel.
Step 5 — Apply Data to Your Splat Actor
In your BP_Tulips (or whatever actor you're controlling):
OSC float value comes in (range ~0.0–1.0 from MediaPipe)
→ Map Range node: remap to your world-space range
→ Set Actor Location / Set Actor Relative Location
OR
→ Set variable that drives a Timeline / lerp for smoothingTip for smoothness: don't set position directly from raw OSC — run the value through an FInterp To or lerp each tick so the splat glides rather than snapping.