luisqtr / exciteometer

The Excite-O-Meter is a user-friendly Unity plugin for XR creators to integrate physiological user information in the development and evaluation of XR content. Specifically, it allows to record, analyze, and visualize validated metrics of heart activity from the chest strap sensor Polar H10 and movement trajectories from VR headsets.
http://exciteometer.eu/
GNU General Public License v3.0
43 stars 4 forks source link

No .unitypackage in releases #16

Closed JayTeeMacquarie closed 1 month ago

JayTeeMacquarie commented 2 months ago

I've got the windows app working and connected to the Polar H10, but not sure how to get the data into unity https://github.com/luisqtr/exciteometer/blob/main/docs/1_UserManual.md#import-the-eom-unity-package

It says

Import the EoM Unity package There are two ways to include the EoM in your existing Unity project depending on whether your project already uses GIT or not.

If you are already using Git as a version control system for your Unity project. Access your Assets directory from the terminal, and add the EoM as a submodule: $ cd Assets/ $ git submodule add https://github.com/luisqtr/exciteometer.git $ git submodule update --init If your Unity project is not using Git, download the .unitypackage from the [latest release branch](https://github.com/luisqtr/exciteometer/releases/latest).

But on the latest release branch there is no .unitypackage

luisqtr commented 2 months ago

Hi,

Thanks for reporting it. The Unity package is the same than in the previous release, I forgot to reupload it. Here is the link:

https://github.com/luisqtr/exciteometer/releases/download/v1.1/ExciteOMeter_v1.1.unitypackage

/Luis

6 sep. 2024 kl. 06:23 skrev JayTeeMacquarie @.***>:



I've got the windows app working and connected to the Polar H10, but not sure how to get the data into unity https://github.com/luisqtr/exciteometer/blob/main/docs/1_UserManual.md#import-the-eom-unity-package

It says

Import the EoM Unity package There are two ways to include the EoM in your existing Unity project depending on whether your project already uses GIThttps://git-scm.com/ or not.

If you are already using Git as a version control system for your Unity project. Access your Assets directory from the terminal, and add the EoM as a submodule: $ cd Assets/ $ git submodule add https://github.com/luisqtr/exciteometer.git $ git submodule update --init If your Unity project is not using Git, download the .unitypackage from the latest release branch.

But on the latest release branch there is no .unitypackage

— Reply to this email directly, view it on GitHubhttps://github.com/luisqtr/exciteometer/issues/16, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC2GY3RBYNRZIJVQE5A62ITZVEU3PAVCNFSM6AAAAABNXY5EC6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYDSNBYGMZDINQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

JayTeeMacquarie commented 1 month ago

Hey Luis I hope you can help me,

I am doing this for a class and am wondering exactly how to effect a game based off of the players current heartrate (or average heartrate in the last 10 seconds to accomodate for variability), e.g. it makes the game harder if their heart-rate is higher. I do find the documentation quite confusing as a student. Is it possible to read an active variable while the scene is playing to reference and effect gameplay?

luisqtr commented 1 month ago

Yes. The easiest way is:

  1. Check if the sample scene in the EoM package is working.
  2. Open your own scene and drag and drop again the main prefabs: ExciteOMeter_Manager.prefab and ExciteOMeter_UI_OnlineAnalysis.prefab.
  3. Attach to any GameObject in your scene the script EoM_DataReceiver.cs
  4. In this line of the script you will receive the heart rate value from the PolarH10 and you can do your own calculations to modify other scripts in your game.

Hope this helps. :) /Luis

/Luis

JayTeeMacquarie commented 3 weeks ago

Yes. The easiest way is:

  1. Check if the sample scene in the EoM package is working.
  2. Open your own scene and drag and drop again the main prefabs: ExciteOMeter_Manager.prefab and ExciteOMeter_UI_OnlineAnalysis.prefab.
  3. Attach to any GameObject in your scene the script EoM_DataReceiver.cs
  4. In this line of the script you will receive the heart rate value from the PolarH10 and you can do your own calculations to modify other scripts in your game.

Hope this helps. :) /Luis

/Luis

I found it interesting that the value in the example scene for the BPM was different to what the exciteometer sample scene read. It wasn't the randomised one either, it was weirdly out by about 10bpm.

I also can see what you mean with the value but how exactly would I sent that to an INT? int HeartRate = DataType.HeartRate.value ? I'm not quite sure how to reference it in my code to say like if(HeartRate >= 80 { do this } )

luisqtr commented 3 weeks ago

For the offset of BPM, note that the example scene contains a GameObject that is a Data Simulator (to test without having the Polar H10 always connected). This simulator should automatically deactivate if it receives real data via LSL. However, you can simply remove it from the scene and check if you get data from the device itself (without the offset)

For your second question, the line I pointed at filters if the received value is a DataType.HeartRate itself. So, you can just call in that line your own function YourCustomFunction(value).

JayTeeMacquarie commented 2 weeks ago

The .unitypackage doesn't contain the file EoM_DataReceiver.cs so I am very confused how to do this.