|
Post by britannis on May 18, 2016 2:31:25 GMT
Possible Unity bug? Here is what the animation looks like in my game view when playing the animation file: gyazo.com/7712b925b5ae3be66c1023634051ec7cHere is what is happening in-game: gyazo.com/c5a7b8468fdd7f3b0181d7c2d3fe4c89According to the inspector, at runtime the transform rotates on the z-axis from 90 (initial setting) to 180 and then back to 90. The animation has a parameter to change the transform rotation to -90 at the start and does not contain any other animation keys that modify the rotation during the animation. This means the transform is rotating the wrong way and also never hitting the -90 or 270 degrees it's supposed to. Any ideas?
|
|
|
Post by Admin on May 18, 2016 16:35:06 GMT
The first link didn't animate anything for me, and I didn't see the problem in the second one either, so I will guess at what your issue might be...
I believe rotation is actually stored on a transform as a quaternion, but you see euler coordinates in the inspector because it is easier to understand. It automatically maps things within a 0-360 range even though you could type -90 and it turn where you expect although it would turn into 270 on its own. Depending on how you set up your animation, this could be the cause of some unexpected issues.
|
|
|
Post by britannis on May 19, 2016 0:42:09 GMT
I was able to fix this after much frustration, but it forced me to do things that are probably better for my project in the long run.
In short:
- I had spritesheets for similar things (ship thrusters) that faced different directions. One spritesheet would have all the thrusters facing right, another to the left. - I was able to rectify the problem by rotating my spritesheets so they all faced the same direction. This allowed me to remove Rotation and Position parameters in each animation.
Now everything works, my animations have less parameters, and my spritesheets are uniform.
|
|