• Runtimes
  • hi how to changle the mix of ik constraints on ue5

i just want control the ik constraint when constraint is playing animation .so the way slove it is set mix of constraint to 0

Related Discussions
...

maybe need add api to ue5 runtime

You can do this via C++, see https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-ue4/Source/SpineUE4/SpineboyCppPawn.cpp for an example on how to access the components.

You can get the spine::Skeleton from the USpineSkeletonComponent via USpineSkeletonComponent::GetSkeleton(). Next, you can find the IkConstraint by name via spine::Skeleton::findIkConstraint(). Finally, you can set the mix via IkConstraint::setMix().

  • wertt22 ответили на это сообщение.

    Mario can I editor the spine plug and add a blueprints called set bone constraint? thanks.which file should I editor...

    Mario and I found set animation speed can.t set for each animation. if I use set time scale all animation will add speed...

    • SilverStraw ответили на это сообщение.

      Yes, you can add a specialized function to USpineSkeletonComponent that you can call from blueprints.

      Add the declaration in this file:
      https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Public/SpineSkeletonComponent.h

      And the implementation in this file:
      https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonComponent.cpp

      Simply follow how the other functions are implemented.

      I'm afraid I don't understand your second question, could you give more details, e.g. like a blueprint?

      wertt22 and I found set animation speed can.t set for each animation. if I use set time scale all animation will add speed...

      I think they used AnimationState::setTimeScale which affected all the animations when they want to use TrackEntry::setTimeScale to set the speed for individual animation tracks. 🤔