emilianavt / VSeeFaceSDK

The VSeeFace SDK for Unity is used to export models in the VSFAvatar format.
149 stars 10 forks source link

Rotation constraints don't work when the constraint source is moved by a dynamic bone script #7

Closed Mysteryem closed 2 years ago

Mysteryem commented 2 years ago

I have a model with two tails. I added a dynamic bone script to move one of the tails and put rotation constraints on the bones in the other tail with the corresponding bone in the first tail as each rotation constraint's only source. In Unity (the VRM that is exported as VSFAvatar) and VRChat (a different version of the same model, but with the same setup), both tails move together, but in VSeeFace the tail with rotation constraints on it doesn't move.

I confirmed that the rotation constraints themselves were working by changing the source in one of them to the model's neck bone and the bone in the tail rotated along with the neck bone as expected in this case.

I did see a mention of VSF_IKFollower and constraints in the README so tried putting VSF_IKFollower on the bones with the rotation constraints, but that had no effect.

I'm using v1.13.36k of both VSeeFace and VSF SDK.

emilianavt commented 2 years ago

Thank you for this report. It makes sense that dynamic bones (and other physics scripts) currently override constraints, because they are all executed after constraints are processed. In theory, they could probably be moved to run before constraints, but this may cause other issues. I will look into it.

emilianavt commented 2 years ago

I've reordered the player loop so constraints (and particle systems) are executed last. Unless I find any issues, this will be in the next release, which will hopefully be some time during the coming weekend.