200Tigersbloxed / UnityMods

A collection of my mods for games that run on the Unity Engine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[HRtoVRChat] Improve isHRBeat

200Tigersbloxed opened this issue · comments

Currently, isHRBeat is very inaccurate and doesn't update through the network properly as the wait interval time given for the parameter to update (0.1 seconds) is not enough time.

The equation used needs to be improved to accurately guess how often the heart beats from the BPM.

MainMod.cs Line 261, the calculation that's made to guess when the heart is beating.

try { waitTime = 1 / (HR / 60); } catch (Exception) { /*Just a Divide by Zero Exception*/ }

(https://github.com/200Tigersbloxed/UnityMods/blob/main/HRtoVRChat/HRtoVRChat/MainMod.cs#L261)

This number that's guessed also needs to be buffed to give the network enough time to sync the parameter globally, which is the big problem.