Unity 3D Support

Official forum for open source FreePIE discussion and development.
Post Reply
Croccy22
Cross Eyed!
Posts: 140
Joined: Wed Feb 04, 2009 7:51 am

Unity 3D Support

Post by Croccy22 »

I am currently playing around with unity and have now figured out how to create a Side by side 3d camera so the next thing it to attach head tracking to the camera.

I have found a TrackIR plugin for unity but when I run their demo project it errors say cannot find instance of object. I have also tried the Freetrack Unity plugin and can't get that to work either.

My guess is that the trackIR unity plugin is looking for the actual device or something?

Has anyone got a headtracking plugin working in unity with a headtracker that is being emulated via FreePIE?

I am using the Sparkfun Razor 9DOF tracker with the AHRS Imu firmware and just want to get it working in Unity. I expect I could probably code for this directly if I look at the documentation but I was looking for an easy way that would give more compatability for other DIY Rift users.

Thanks, Matt.
User avatar
mcsilvio
Two Eyed Hopeful
Posts: 57
Joined: Tue Feb 22, 2011 3:10 pm

Re: Unity 3D Support

Post by mcsilvio »

Hi there,
I am tackling this same problem from the other end. I've written some working Unity3d code, but I don't have a good tracking device. Maybe we can work together on this?

Cheers,
Marco.
Croccy22
Cross Eyed!
Posts: 140
Joined: Wed Feb 04, 2009 7:51 am

Re: Unity 3D Support

Post by Croccy22 »

Hi,

What do you have working so far? I am just looking around at all sorts of solutions to get the outputs from my tracker to feed into unity but I am very new to unity. Although I have coded is most languages at some point so it shouldn't be too difficult to work out.

However I want something that will work with FreePIE ideally so then multiple trackers will be supported. I'm not sure how the Shared Memory stuff works in FreePIE since this is what Vireio uses.

Matt.
User avatar
mcsilvio
Two Eyed Hopeful
Posts: 57
Joined: Tue Feb 22, 2011 3:10 pm

Re: Unity 3D Support

Post by mcsilvio »

All I have working so far is a script that reads UDP messages for orientation and moves a Unity camera based on that data. That makes the camera seem as "your" perspective. But the device I was using was unreliable and had glitches at certain orientations.

I haven't used FreePIE. I will get that running and see what it outputs.
Croccy22
Cross Eyed!
Posts: 140
Joined: Wed Feb 04, 2009 7:51 am

Re: Unity 3D Support

Post by Croccy22 »

Not sure when it is due but the new version of FreePIE supposed to include a "Generic Tracker" plugin which if something is written to support that plugin then all devices supported by FreePIE will be able to work. This definately seems like the best idea :)

Matt.
User avatar
mcsilvio
Two Eyed Hopeful
Posts: 57
Joined: Tue Feb 22, 2011 3:10 pm

Re: Unity 3D Support

Post by mcsilvio »

I'll give FreePIE a whirl. I'll put the script on github once I get it working.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Unity 3D Support

Post by CyberVillain »

In next version we will have a generic tracker plugin that any software can read or write to.
Its on github but not in the installer version, also there will be a C library that you can use, right now the library is not in Github. Until it is you can use the shared memory pipeline.

Take a look at the plugin here

https://github.com/AndersMalmgren/FreeP ... cPlugin.cs
zalo
Certif-Eyed!
Posts: 661
Joined: Sun Mar 25, 2012 12:33 pm

Re: Unity 3D Support

Post by zalo »

Speaking of Unity 3D support, using FreePIE to pipe data from a Wiimote into Unity would be a lifesaver.

"Shared Memory Pipeline"... How would I utilize this to get FreePie to interact directly with Unity?

Edit: Got Uniwii working on windows by deleting all the inputs and running the built application (without unity running in the background). Newer versions of unity automatically connect to joystick devices and siphon off their data, preventing libraries within unity from connecting properly.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Unity 3D Support

Post by CyberVillain »

Just a few days and we will release (We put Wiimote plugin on hold to get out a new version first). New version will hava a C dll you can use to read / write to FreePIE
Post Reply

Return to “FreePIE”