Freetrack Plugin

Official forum for open source FreePIE discussion and development.
Post Reply
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Freetrack Plugin

Post by CyberVillain »

Discussion around the Freetrack plugin
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Freetrack Plugin

Post by CyberVillain »

jimNY, do you have the Freetrack software installed or not?
jimNY
One Eyed Hopeful
Posts: 4
Joined: Mon Dec 10, 2012 10:23 pm

Re: Freetrack Plugin

Post by jimNY »

Yes I have installed it. But i'm not sure how to use it.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Freetrack Plugin

Post by CyberVillain »

jimNY wrote:Yes I have installed it. But i'm not sure how to use it.
Hmm ok that is strange, my guess was that since I have Freetrack installed that i missed some dependencies for faking it that you are missing, but since you have it installed that cant be the case.

So you have successfully gotten values from AHRS into FreePIE but not sending values to a Freetrack game using FreePIE?

just try something like

Code: Select all

freeTrack.yaw = math.radians(20)
That should make the game look 20 degrees right

edit: If you have Freetrack installed try to play the demo loop inside Freetrack and see if the game reacts to that
jimNY
One Eyed Hopeful
Posts: 4
Joined: Mon Dec 10, 2012 10:23 pm

Re: Freetrack Plugin

Post by jimNY »

Alright I tested the demo inside Freetrack and it works fine in game.

I also ran the line freeTrack.yaw = math.radians(20) in radians and degrees in FreePIE and it works in game but bears no difference.

Using the diagnostics in FreePIE it is also reading the values from the Razor IMU, but it doesnt seem to be sending the values to the game.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Freetrack Plugin

Post by CyberVillain »

jimNY wrote:Alright I tested the demo inside Freetrack and it works fine in game.

I also ran the line freeTrack.yaw = math.radians(20) in radians and degrees in FreePIE and it works in game but bears no difference.

Using the diagnostics in FreePIE it is also reading the values from the Razor IMU, but it doesnt seem to be sending the values to the game.
if freeTrack.yaw = math.radians(20) works then freeTrack.yaw = math.radians(ahrs.yaw) must work otherwise there are something really strange going on
alienatorZ
One Eyed Hopeful
Posts: 12
Joined: Thu Dec 27, 2012 3:23 pm

Re: Freetrack Plugin

Post by alienatorZ »

Ok so I have FreeTrack and FreePIE. I can see my android phone orientation in FreePIE. How do I use that in a game? I see on here people just "use it" but when I use the android > freetrack example I see nothing happening in game. How can I test this?

diagnostics.watch(freeTrack.yaw) is always 0.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Freetrack Plugin

Post by CyberVillain »

Hi alienatorZ!
First, current version of FreePIE requires you to have some preinstalled Freetrack stuff for it to work (Next version will fix this automatic).

Do you have Freetrack installed?
if not do one of the two following things

1) Install and run and exit Freetrack atleast once. This will make sure FreeTrackClient.dll is present on disk and that the path to it is added to the Windows registry.

2) Download FreeTrackClient.dll from https://github.com/AndersMalmgren/FreeP ... l?raw=true and copy it to any folder.

Run regedit.exe and add a key to //Current user//Software//Freetrack//FreetrackClient named path set the value to the folder where you copied FreeTrackClient.dll, exclude filename like c:\freetrackclient

edit: Sorry im tired just saw that you have Freetrack, just make sure the registry path is there

Exactly what script are you using?

Code: Select all

diagnostics.watch(freeTrack.yaw)
Only works when sending real values from Freetrack, you can test that by using the demo in Freetrack (Also if you have Freetrack installed test this with your game to see that its working). Maybe I should fix so that when you write values to freetrack they should be bounced back so you can see them using diagnostics.watch(freeTrack.yaw)

Which game is it?
alienatorZ
One Eyed Hopeful
Posts: 12
Joined: Thu Dec 27, 2012 3:23 pm

Re: Freetrack Plugin

Post by alienatorZ »

Thank you cybervillian.

I did get it running. The code in the example was wrong. The freetrack outputs need to be set in the update() function for it to work.

Now.... To smooth out the crappy values my phone is giving me..... :?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Freetrack Plugin

Post by CyberVillain »

alienatorZ wrote:Thank you cybervillian.

I did get it running. The code in the example was wrong. The freetrack outputs need to be set in the update() function for it to work.

Now.... To smooth out the crappy values my phone is giving me..... :?
Hmm, no that shouldn't be needed, which example are you using?

You can try filters.simple, but if its to bad it wont help.
Post Reply

Return to “FreePIE”