Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Calculating Calories Burned in Unity VR Project on Meta Quest 2

Discussion in 'VR' started by rahulchawla2801, Aug 3, 2023.

  1. rahulchawla2801

    rahulchawla2801

    Joined:
    Oct 5, 2021
    Posts:
    34
    I'm currently working on a VR fitness game on Quest 2 and would like to implement a feature that calculates calories burned during gameplay. I'm exploring different options for obtaining this information.

    1. Meta Quest Move App: I'm aware of the Meta Quest Move app, which can track fitness activities on the Quest and provide calorie and fitness data. Are there any APIs or methods available that allow me to access calorie burnt and other fitness information from the Meta Quest Move app within my Unity project?

    2. Third-Party Applications/Tools: Alternatively, I'm open to exploring third-party applications or tools that can calculate calories burned during VR experiences. If there are any external apps or services that can be integrated with Unity and provide real-time fitness data, I would appreciate any suggestions or recommendations.
    I'm looking for a reliable and accurate solution to estimate calories burned during VR gameplay on the Meta Quest 2. If anyone has experience with integrating fitness data from external sources into Unity projects or has any insights to offer, your help would be greatly appreciated.
     
  2. bala_love

    bala_love

    Joined:
    Jan 28, 2022
    Posts:
    1
    Did you get anything that could be used? I'm looking for the same thing as you
     
  3. Max_Bol

    Max_Bol

    Joined:
    May 12, 2014
    Posts:
    168
    First, to put it bluntly, if you want to extract any form of information from the Meta Quest Move app, you need to directly get in touch with META itself because allowing remote access to personal data between unrelated app publishers/software could be a serious legal case. (Basically, you need to create a partnership with META that officialese the use of the Meta Move app data into your own system and publicly display that "Hey this app and that app are sharing your personal information if you're using both" and so on.)

    When it comes to the Meta Quest Move app, it's actually not possible for you to reach "that" level of precision due to a factor that is in Meta's camp as both the app publisher and manufacturer manager: The Move app is registered as an OS app (which is why it can't be removed) which gives it access to the raw data from movement of the headset and hands controllers. When you run a regular non-OS app on the Quest 2, you can't get access to all of that raw data , but instead you get the result of a conversion of that raw data which is slower and less precise for something like calories burning. The Move App doesn't actually "check" the visual confirmation of the hand controllers, but uses the OS' signal strength and orientation with the controller and META formulated a solution that determines the energy spent from any changes in signal strength and orientation.

    To give an example of the difference:
    If you look forward with the Quest 2 and move the controllers around your groin or belly button area, the headset have an insane difficulty tracking those controllers because it lacks visual confirmation within the system that returns the position and orientation value. The movement amount detected in those instance will be insanely high because the controllers will keep moving large margin randomly. The same applies if you put the controller behind the head/headset, around the ears area. That "movements" issues is not a problem with the Move app because it doesn't use that "unstable" system that heavily rely on the cameras on the headset.

    While it's actually possible to get the signal strength of the controllers, you don't have any form of OS controller over it to know what's the relation as a distance. The signal strength between users will varies depending on the controllers and headset micro antenna, the battery state in the controllers and even if a button is pressed or not on the controller. The Move app is programmed with the same kind of "controller" as the headset OS to convert that data efficiently. You don't have access to all that already-calculated math so you would have to build the converter yourself via massive amount of testing with various devices and controllers in various battery states.

    With all that said, I'm not writing that you shouldn't work on your idea. In fact, the issues I mentioned above are why there aren't much of any reliability with the exercises apps on the Quest2, unless they involves movement in front of the cameras so if you overcome those issues, you're basically in a prime/top position for your project.

    If you're able to move pass the issues I previously mentioned on reliability, calculating the calories burns will have to be defined with lots of math and validation.

    For example, here's an example with a site that calculate the difference in calories burn between standing and sitting:
    Link to the site.

    That's just 1 example of the kind of thing you'll have to consider when calculating the calories burns: Is the user sitting or standing? How tall is he/she from the app perspective? After all, there's a correlation between the arm length and the amount of calories burns per full meter of movement being totaled as well as if you're flexing more muscles or less muscles in certain patterns of movements. There's also the weight and muscle mass that will heavily factor the calories burned. All those floating factors makes it so that what you generally can access with the Quest 2 is unreliable and inaccurate by default.

    So, how could you work on this? Well, if you want my opinion, I would say that your best bet is to emphasize on the mid-high end options for the users that are truly serious in the matter: accessories.

    What do I mean by that? Well, get in touch with the high tech companies in the fitness industry and look up for potential partners with whom you could potentially build an app that make uses of their devices with a Quest 2 via Bluetooth. This is already a thing on the PCVR market, but the Quest 2 (as a standalone VR device) is still lagging behind so if you're serious in this it can be a good opportunity for the future.

    For example, you could develop an app that connect to various devices and simulate some good environments based on the device like a treadmill simulator that connects to a smart treadmill with scores, leader board and displaying various kind of fantastic or sci-fi or relatively realistic (more like cartoonist considering the Quest 2 capacity) environments. That would be a LOT more reliable than anything else because there is already researches done on the calories being burned in the process and you're basically only pushing the existing experience 10x further.

    Also, I wouldn't be surprised if you would get full assistance (both financially and with tech stuff) by META on the matter of such apps (if you're showing results or the capacity to actually make it) because it would allows META to partner up with quite a few tech companies to promote sales of its headset to a broader public.