Skip to content

Latest commit

 

History

History
52 lines (30 loc) · 2.01 KB

File metadata and controls

52 lines (30 loc) · 2.01 KB

Unity.FreeD

UDP FreeD listener and Unity bridge: receives 29-byte FreeD packets and drives a transform (and optional camera FOV / focus heuristics).

Install as a Unity package

From a local clone (embedded)

This repository already contains the package at Packages/com.shironeko.freedd/. Open the project folder in Unity.

Add to another project

Option A – local path (UPM)

  1. Copy Packages/com.shironeko.freedd into your project’s Packages/ folder, or
  2. In Package Manager → Add package from disk…, select com.shironeko.freedd/package.json.

Option B – Git URL (UPM)

In Packages/manifest.json add:

"com.shironeko.freedd": "https://github.com/shironeko-digital/Unity.FreeD.git?path=Packages/com.shironeko.freedd"

(Adjust the URL/branch as needed.)

Optional sample

After the package resolves, use Package Manager → Samples → FreeD Camera Tracking → Sample Scene to import a ready-made scene.

Usage

  1. Add FreeDLink to a GameObject (typically the Main Camera if you want FOV/focus mapping).
  2. Configure Listen Port (default 40000) and Camera Id (byte 1 in the packet).
  3. Play Mode: tracking applies each frame after FreeDServer.PumpMainThread() runs from FreeDLink.Update.

Protocol details: 29-byte frame, big-endian 24-bit fields, angles scaled as degrees, positions as millimetres, zoom/focus as unsigned raw encoder values unless you calibrate.

Testing

See Packages/com.shironeko.freedd/Documentation~/Testing.md for Edit Mode tests and a manual UDP checklist.

Configuration notes

  • Packet.EnforceChecksum / Packet.EnforceMessageType: static toggles for strict validation (default on).
  • Yaw Offset Degrees: default 90 preserves the legacy studio offset; tune per rig.
  • Apply Lens Heuristic: legacy FOV = lensFovNumerator / (Zoom / lensZoomDivisor); disable for encoder-only pipelines.

License

See repository license file (if any).