TedNindo

Hi spine team,

I would like to change the rotation mix value of my tranformConstraint, via code. I could not figure out how to do it. I have been looking for a while and have tested a few things.



I am thankful for any direction here. :)
TedNindo
  • Postovi: 46

Harald

Did you try the following as well?
Spine.TransformConstraint constraint = skeletonAnimation.Skeleton.FindTransformConstraint(name);
constraint.MixRotate = 0.5f;
Avatar
Harald

Harri
  • Postovi: 3924

TedNindo

Thank you, Harald.
My plan was to assign the reference via Inspector. Which seems not the right way to do it. So thank you for the explanation.

Great!

Just one quick addition: it seems to be [ constraint.rotateMix = mix;]
At least if you use an Animator like me.
TedNindo
  • Postovi: 46

Harald

TedNindo je napisao/la:My plan was to assign the reference via Inspector. Which seems not the right way to do it. So thank you for the explanation.
I'm not quite sure what you mean by "assign the reference via Inspector". Anyway, glad you've figured it out!
TedNindo je napisao/la:Just one quick addition: it seems to be [ constraint.rotateMix = mix;]
At least if you use an Animator like me.
Ah, you seem to be using spine-unity 3.8 then, in 4.0 and newer these properties have been renamed from rotateMix to mixRotate for consistency reasons. :)
Avatar
Harald

Harri
  • Postovi: 3924


Natrag na Unity