Physbones Regression: "Allow Grabbing" no longer updates via animator
complete
a
alareis
As of build 1286, animator updates no longer propagate to "Allow Grabbing" property.
Replicated through:
avtr_440de033-9a75-4464-b6fb-fe3df677db93 under /ratshot_jug/ratshot_Skin/tag_origin/j_mainroot/j_COCK, last two layers in FX controller. QM > Funnies > Disable Crotch Plate Grabbing
Under normal circumstances upon lifting the crotch plate's bone (j_COCK) enough to reach 0.65 in reported angle, you would hear a demoman's "ka-boom" voice clip play. As expected, when the crotch plate grabbing is disabled, one can't grab the bone and can't trigger the voice clip playback.
Presently, one can't grab the bone regardless of its configuration.
This potentially affects other properties as well; haven't checked.
Log In
Phasedragon
complete
a
alareis
Phasedragon: this seems to be fixed as of 2024-05-02. Unsure which build this behaviour had changed with, though.
spex_wulf
~ VRCSDK V3.5.0 in Unity 2022.3.6f1
Might be related, but I have some more info to add to the mix.
While animating the 'VRCPhysBone.AllowGrabbing' and the 'VRCPhysBoneBase.AllowGrabbing' values in C# - the resulting values were returning a long type value (True = 1.4013e-45) in the inspector(this can be seen by recording a new animation and changing the 'Allow Grabbing' drop down) and writing a double(True = 1e-45) to the actual .anim file(by opening the .anim file is a text editor), enum Integers.
So when these animations were being Previewed in Unity, these values were reverting back to 0, as animation curves are supposed to use floats.
Any attempt to preview the resulting animation snaps the values for each Allow Grabbing animation value back to 0(I'm guessing Unity is doing this as the long/double is being converted back to a float when being evaluated?).
I haven't testing these pre-preview animations(the ones still displaying the double value), but I'm guessing the engine would change these back to 0 as well, same as the editor)
However, when Setting the 'Allow Grabbing' option to other and animating the Allow Self/Others check boxes. The Allow Grabbing animation values(while previewing and recording the animation) no longer set the VRCPhysBone/base.AllowGrabbing animation value back to 0 - it stays as the long (2.8026e-45) in the Editor.
spex_wulf
Adding to this, when building the animation curves in C#, if I feed the the value '1e-45' in for the animation curve, for allow grabbing as True. (3e-45 for Other, 0 for false)
Eg; in my script
SetCurve(gameObjectToAnimate, typeof(VRCPhysBoneBase), "allowGrabbing", 1e-45)
the animation value '1.4011e-45' is still shown in the animation value - but the Editor appears to respect it.
I'll be taking this animation into game shortly and checking the results.
a
alareis
Kiro, any updates on the state of this thing? It's still busted.
Moreover, the provided replication package will expire by the end of the week for good.
Kiro
needs more information
Phasedragon
tracked
DrBlackRat
Has this Avatar been updated to use the new
Allow Grab for Others
and Allow Grab for Self
toggles for the animation?That might be needed to get it to work again, since the way grabbing is toggled has changed.
a
alareis
DrBlackRat: it was updated two days ago with SDK of 3.1.13 to test exactly that, and it didn't work.
Fact is, the updated finer grab controls are backwards-compatible, as the animation references a property called "allowGrabbing", which still changes to 0, even when recreated. At least in the case of switching it to False. The .anim files are identical.
DrBlackRat
alareis: I just did some testing and my suspicion was correct!
What I Found:
You can't animate the drop down it self, so setting the drop down to
True
/ False
via an animation will not work.What will work though is setting the drop down to
Other
and then animating / toggling the two check marks. When doing so you can animate grabbing etc without any problems.Attachments:
Here is a video showcasing what I did:
a
alareis
DrBlackRat: confirming; this workaround seems to function, cheers. Unfortunately, I can't edit the post body to add your solution to it.
I suppose a better-fit question then follows.
Phasedragon: why was this breaking change introduced without any notes? Moreover, it doesn't make sense for booleans to work, while a enum won't.
Kiro
alareis: We have done testing internally but we have been unable to encounter any issue. Using the latest SDK we are able to animate the new enum based Allow Grabbing and those animations worked when uploaded affecting if something could be grabbed. We also tested uploading similar animations from an older SDK and those worked in the latest client.
At this time we don't have a repro for what is being described. If someone is experiencing this issue we likely will need the project files of their affected avatar so we can inspect their animations and behaviour in client.
Kiro
DrBlackRat: The property is able to be animated like any other value in Unity. We have tested this internally and haven't encountered any issue like the one you have described. If you are able to provide a project file we can look into what might be happening.
Video
DrBlackRat
Kiro: How weird it works for me as well now. Maybe something was wrong with my Animator in the first test, who knows.
As you can see here, it works just fine:
a
alareis
Kiro: I dug down and managed to narrow the conditions down a bit. It seems that this issue occurs when animators are mixed down. Or at least somewhere around that part.
Specifically, it occurs when Gestures "layer" is referenced. Here is a replication example: https://mega.nz/file/eUNnTRSJ#1nmY4wqKQQYlEik04gXjpRYCpS9ePjMCvO7kAp7AYbw
Load the provided scene from "Assets/Alareis/Export/VRC Bug Report/PB Propagation/Scene/PB-Propagation-Showcase.unity" and take a look at "ratshot_jug" in it. Removing gesture layer seems to fix the issue. However, I haven't tested other possible "layer" combinations, so it could either be just Gestures, or it could be any other variation.
For the sake of reference, I've also reverted changes DrBlackRat proposed in the avatar linked in the post body.