Open LeCloutPanda opened 2 weeks ago
prime was going to implement this a while back For desktop mode
I also had remembered hearing about this previously. I checked internally and the work @ProbablePrime was doing towards this appears to have been closed? https://github.com/Yellow-Dog-Man/FrooxEngine/pull/626
Seeking input from @Frooxius or @ProbablePrime if this node is still desired / viable?
From the comments made internally- it sounded like the desired approach was to map the user's head height relative to their overall height as a float value "crouch strength", and either expose that directly, or let the user choose the threshold to compare against and output a bool.
I did work on this yes. Unfortunately it required more consideration that I had originally anticipated so I had to halt work and double check the demand and requirements.
As there at the time was no GH issue for this, I filed it away in the back of my head as just something that I would like, at which point it was not a priority.
Now other users want it, we should reconsider the priority.
However, the main blocker is still deciding and testing/tweaking a definite strategy for determining if someone is crouching.
As @shiftyscales said, "map the user's head height relative to their overall height as a float value "crouch strength"" is one such solution, but I didn't perform any testing at the time to validate if this was a good approach.
With all things considered, I'm unable to prioritize this at the moment, but happy to help anyone who would like to pick it up.
It's a bit general, but a number of other VR titles that have the same concept consider the player crouching if they're less than 75% of their configured standing height, while others have a hardcoded value that toggles crouch/stand logic. I don't think the latter is a good choice for resonite, but a 60-75% check is probably a pretty safe range.
Onward and Contractors are games that work with a hard coded value (5'3 in both games if I remember right), while VRchat is a game that uses the 75% number to know to switch you to the game's seated mode after a time.
For desktop users, you can retrieve the value as true/false but for VR users, as @ko-tengu suggested the 75% method could be used and for the node it could output both a true/false value and a crouch ratio ranging from 0 to 1, allowing users to choose the value that best fits their needs.
I know I would like a node like that, as it would help in some of my projects.
Is your feature request related to a problem? Please describe.
Lack of ability to determine if a user is crouched or not without doing weird math has made a lot of systems really weird functionally and in some cases impossible.
Describe the solution you'd like
A node that exposes whether or not a user is crouched or not, the game knows we are crouched by the locomotion stuff uses that value.
Describe alternatives you've considered
Really jank flux that calculates distance between head and feet/hips when standing and crouching then checks to see which is closer to the current distance between the points
Additional Context
No response
Requesters
LeCloutPanda(Discord)