In a small project I am working on, I have a character that I want to patrol around the screen a little. It chooses a random target to the left or right and heads there, waits some random amount of time, and then repeats. When the unit moves left on the screen, I am setting SkeletonAnimation.skeleton.ScaleX to -1, which is successfully flipping the sprite and animation. The problem is it seems to be flipping it on some arbitrary point some distance to the left rather than flipping it at the location of the root bone.
I've opened the project back up in Spine itself and confirmed that when I scale the root bone to -1 on the X, the flip works like you would expect.
I don't know if I am missing something simple in Spine itself, or if the problem is coming from Unity. For what its worth, the Gameobject in Unity is not parented to anything, so it's not a parent/child transform problem that I can see.
Page 1 of 1
- Posts: 1
Hello, could you share your code? This may help us identify why things are not working as intended.
- Posts: 149
Mark topic unread • Page 1 of 1
Return to Unity