GSolvberg

Hello

I believe I have discovered a problem with the execution order of the BoneFollower component, specifically regarding skeleton flip.

I have some code that flips my skeleton in MonoBehaviour Update. If this code executes after the SkeletonAnimation Update,
the skeleton will not have been flipped yet, and the BoneFollower in LateUpdate will not rotate the bone. But BoneFollower reads Skeleton.ScaleX directly and changes the scale immediatly.
This leads to the BoneFollower flipping the same frame, but not rotating until next frame.

This is of course easily fixed by changing the execution order of the script that triggers the flipping. But my impression is that this may not be intended behavior by the BoneFollower component.

Best,
GSolvberg
  • Posts: 2

Harald

GSolvberg wrote:I have some code that flips my skeleton in MonoBehaviour Update. If this code executes after the SkeletonAnimation Update,
Please ensure that your code executes before SkeletonAnimation.Update. SkeletonAnimation.Update will apply your animation to the skeleton, so it's not a good idea to have your modification to skeleton.ScaleX occur too late, even if you don't need it instantly.
User avatar
Harald

Harri
  • Posts: 4459


Return to Bugs