zeuxgame

as our project upgrade to spine 3.x
all our character used flip timeline are change to scale
but the different between flip and scale is the one have tween and another don't
so characters animate in runtime like still has mix then at a specific to suddenly flip seems impossible
the problem is not tween, we can key two keys very closely to make it flip
but in mixing situation scale will auto tween to another animation
if two animation's scale are different, it will use mix time to tween the scale

is there a nice solution for this?
we don't want to abandon mix effect
but still want to have a sudden flip
zeuxgame
  • Сообщения: 29

Pharan

1) You don't need two keys very closely to make it flip. You can just change the interpolation/curve type to "Stepped".

2) I've brought this up with Nate.

Just off the top of my head, for your purposes, I suppose we could make the scale keys Apply think the latest-applied scale sign is the one you want.

If you are using spine-unity and spine-csharp 3.1.05+ (not the 3.2 beta), you can try replacing your Animation.cs file with this: https://gist.githubusercontent.com/pharan/89511112febd44929c40bb74ecdd1371/raw/ba76bdec8d944e20188bbb26154e1ae6a70bec19/Animation.cs

That's not optimized yet but there shouldn't be a noticeable difference as long as you're not scaling all the bones of dozens of skeletons.
Here, the scale magnitude still interpolates but scale sign won't. (so going between positive and negative scale will be immediate).
Аватара пользователя
Pharan
  • Сообщения: 5366


Вернуться в Unity