[Feature request] Add a bool parameter that is true if Avatars 3.0 Parameters and Behaviors are ready to be executed, and the Avatar Wearer has loaded and synced their Expression Parameters
Haï~
This is a follow up to the following cannies:
- [BUG] VRC Avatar Parameter Driver does not work for a few frames after avatar loading https://vrchat.canny.io/avatar-30/p/bug-vrc-avatar-parameter-driver-does-not-work-for-a-few-frames-after-avatar-load
- [Bug] When other players load an avatar faster than the avatar wearer, the expression parameters can have unintended values which may cause clothes to disappear for a split second https://vrchat.canny.io/avatar-30/p/bug-when-other-players-load-an-avatar-faster-than-the-avatar-wearer-the-expressi
As an avatar creator, I would like to know when the Avatars 3.0 system is loaded and ready to go, so that I can execute state machines that are sensitive to avatar loading conditions at the right moment.
My proposal is to add a new bool parameter that is True whenever Avatars 3.0 is ready to function.
When that parameter is True, then the Avatar creator can assume that the following assertions are true:
- When true, it should be assumed that Avatars 3.0 system has successfully loaded for the person who is wearing the avatar, even in the case when other players load the avatar faster than the avatar wearer.
- When true, it should be assumed that all of the Expression Parameters of the newly loaded avatar have synced at least once with the expected values for remote players -- that is, that bool remained false for as long as the avatar wearer has not loaded the avatar yet nor synced the correct Expression Parameter values.
- When true, it should be assumed that Animator Behaviors such as Drivers are going to work properly once we enter a new state that has one.
- When true, it should be assumed that Animator Parameters like IsLocal, VRMode, TrackingType have a defined and stable values that are unlikely going to change afterwards.
This may help solve the following cases for avatar creators:
- On some logic layers, this allows evaluating the rest of the state machine at the right moment, triggering Driver behaviors (i.e. random number generators, etc.).
- On some layers, this could allow a temporary stopgate in order to enter the correct state machine that matches the user's TrackingType and VRMode.
- If a layer needs to handle the case where Expression Parameters have a default value that is not 0 or that is not false, this prevents the animator from carrying on until the Expression Parameters have been synced by the avatar wearer.
This also avoids having to wait for an unreliable arbitrary number of frames.
Log In
lackofbindings
It's kind of a hack, but you can check for TrackingType > 2. On av3 humanoid avatars TrackingType will never go below 3. So you know that if it is below 3 then the parameters haven't loaded yet.
lackofbindings
Side note, this isn’t enough if you’re trying to execute a tracking control behavior on startup. For that you need to wait for TrackingType > 2 and then use a parameter driver to set a local parameter, that you can then use for the transition condition to the state with the tracking control behavior.
Saigo
I wanted to add to this request a similar, yet distinct, post of my own. It's similar to this in that it shows you that others have initialized av3, but I feel it is distinct in that it only cares about whether your animator has initialized or not and allows the creator to handle only what they deem necessary with it.