Adding VRCThumbParams functionnality#26
Conversation
| let ext_autopilot = ext_autopilot::ExtAutoPilot::new(); | ||
| let ext_storage = ext_storage::ExtStorage::new(); | ||
| let ext_gogo = ext_gogo::ExtGogo::new(); | ||
| //let ext_thumb_params = ext_thumb_params::ExtThumbParams::new(); |
There was a problem hiding this comment.
what's with these commented lines? isn't it easier to just remove them?
|
sorry, scories from my first look at my use case, before we had a conversation |
|
let's only send parameters if their values have changed. no need to send controller type and such on every frame. i would store the last sent values in Option<> and then you can clear the option if the avatar changes to trigger a re-send |
|
Aside from adding complexity to the code, I don't see real benefits to that approach. While I agree it would be more elegant to do it that way, I tend to follow KISS principle to avoid weird bug. Also to avoid breaking use case people could have with the Windows version from I5UCC as it sends all the parameters all the time, I believe it's best to keep it that way. Network load is local, it's just a couple of parameters and it's UDP, so not really a crazy amount of data, nor any time consumed in ACK/SynACK/Retransmission/checksum. Network Sync for remote players will still happen with all the data every 10th of a second, no matter the frequency at which we update the local stuff. And the "heavy" part is the detection which needs to be done every frame nonetheless so ... |
|
I'm not sure, when I was working on the face tracking part, sending all FT params on all frames would cause VRC to glitch and miss OSC messages. And so all such params are now only sent if the value has changed, and the behavior is fixed. I would personally prefer if it wasn't spinning in the background, especially considering it's a feature I won't be using, and there's no way to opt out of it. |
|
added a --thumb_params option to enable feature, disabled by default, also implemented the Option<>/On change function. |
Objective of the code is to get thumb positions forwarded through OSC like VRCThumbParams.
Code was partly generated through generative AI (I did not had time to get into the OpenXR API to properly do it myself).
I was able to test it with Quest Controllers, but not with Index ones (my Index setup is currently broken).