I can't make "bone.fAngle" to work if run from another layer
Posted: Thu Aug 11, 2022 11:55 pm
Hi, I assumed this would work flawlessly since I think at some point it worked to me in the past, but turns out I'm in trouble now making "fAngle" (or similar) work from a different layer even I can access bone's layer's skeleton without problems in different ways. I was about to report it as a bug, but with these things one is never totally sure about if it's really a know limitation or even if you could be missing something obvious... So I've prepared a very simple moho file and two embedded scripts (with some extra info/comments) to show the problem. Here is what you'll get while playing:
As you can see, the left red bone rotated directly by the script attached to the BONE layer works as expected (not even requiring an "UpdateBoneMatrix()"), but the right one or green simply don't make the vectors move no matter what... I did't even try things like "UpdateCurFrame()" because, as you'll probably know, it would mean open a can of bugs/errors if run from an embedded script... And, well, the download link rl_fAngle_tester_20220812-0011.zip
Any reason it could not work? As long as you can access the skeleton you should be able to make this simple thing to do its job, isn't? But maybe I'm colliding here with how order of things are calculated under the hood and there is technical reasons why bones moved by "fAngle", "fPos", etc. from a child layer's embedded script are not able to pass its motion to vectors? Well, thanks in advance for your time and any throwed light!
As you can see, the left red bone rotated directly by the script attached to the BONE layer works as expected (not even requiring an "UpdateBoneMatrix()"), but the right one or green simply don't make the vectors move no matter what... I did't even try things like "UpdateCurFrame()" because, as you'll probably know, it would mean open a can of bugs/errors if run from an embedded script... And, well, the download link rl_fAngle_tester_20220812-0011.zip
Any reason it could not work? As long as you can access the skeleton you should be able to make this simple thing to do its job, isn't? But maybe I'm colliding here with how order of things are calculated under the hood and there is technical reasons why bones moved by "fAngle", "fPos", etc. from a child layer's embedded script are not able to pass its motion to vectors? Well, thanks in advance for your time and any throwed light!