Closed JayTeeMacquarie closed 1 month 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: @.***>
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?
Yes. The easiest way is:
Hope this helps. :) /Luis
/Luis
Yes. The easiest way is:
- Check if the sample scene in the EoM package is working.
- Open your own scene and drag and drop again the main prefabs: ExciteOMeter_Manager.prefab and ExciteOMeter_UI_OnlineAnalysis.prefab.
- Attach to any GameObject in your scene the script EoM_DataReceiver.cs
- 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 } )
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)
.
The .unitypackage doesn't contain the file EoM_DataReceiver.cs so I am very confused how to do this.
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