- Modifié
Spine is reversing X and Y values of Scale in JSON on export
Using:
Latest version of Spine 2.1.27
In my animations, I scale certain parts, such as the eyes vertically(set Y to .1) to make the character blink and what not. When we actually run through a browser the scales are all flipped. Meaning instead of the eye squishing vertically, it squishes horizontally.
I found the code in the JSON, and it is exporting as shown below:
"scale": [
{ "time": 2.2333, "x": 1, "y": 1 },
{ "time": 2.3666, "x": 0.1, "y": 1 },
{ "time": 2.4666, "x": 1, "y": 1 }
Notice that the code shows the x value being adjusted, NOT the y. If you look at the screenshot below, you can see that the y value is what i am setting in Spine.
It seems that when the JSON is exporting, ALL x and y values pertaining to Scale are getting swapped.
I'm using the same version on a mac and it is doing that as well. It's driving me nuts. What's up with this?
The x and Y axis are switched in the json code...?
... in your picture you are scaling the X down to 0.1. ? You have some rotation on that eye in the animation, could it be that which is effecting it. could you be resetting the (slots) rotation to 0' instead of the 90 you have in the picture.
I got 90' because your bone scale is 0.1,1, but your image is squished vertically, and your bone rotation is 0... Wait, I lost myself. Anyway your animation is scaling in the X.
... in your picture you are scaling the X down to 0.1. ? You have some rotation on that eye in the animation, could it be that which is effecting it. could you be resetting the (slots) rotation to 0' instead of the 90 you have in the picture.
I got 90' because your bone scale is 0.1,1, but your image is squished vertically, and your bone rotation is 0... Wait, I lost myself. Anyway your animation is scaling in the X.
BinaryCats, that was really helpful. I realized that i had a parent bone that was rotated, and that was causing some issue. That part of the problem is fixed now.
However, I m having lots of trouble setting scale to -1 to flip bones. For example, I have a left leg in my character, and on some animations I want it to flip so that the knee and foot face the other direction. It works great and looks greater WITHIN Spine. But when I run it in a browser, nothing is actually reversed. It doesn't seem to be honoring the negative value.
Do some runtimes not allow negative scale values? I'm using spine.js and spine-canvas.js. Also, I realize this thread is no-longer about a bug, I can delete and repost if that is the preference.
Im no expert on runtimes (other than c ) but I think I recall someone having the same issue, that flipping doesn't work in browser, so I would say it is a runtime issue. what the specific issue is, I am unsure