• Unity
  • Lock rotation?

Hi everyone!

I'm a new PRO user and I'm just starting to work with the Spine - Unity pipeline.

I've got a problem with animation mixes. I think that the mix calculates the shortest angle between the frame of the animation it is playing and the first frame of the next animation to be mixed. The problem is that, as you can see in the attached GIF, the rotation of the shoulders is totally inadequate.

Is there some way to lock arm rotation or to determine the way a bone should rotate?

Thanks in advance.

Related Discussions
...
  • Изменено
pixelmeat написал

as you can see in the attached GIF

It's actually hard to see what's going on.

Anyway, right now, just in general, I don't think there's a way to specify which direction it should rotate.
Spine (currently) always uses shortest distance when interpolating between keys within an animation.
When mixing, I'm not sure how it does things.

This is one reason we don't use a fully animated jump animation for all bones. Ours starts with keyframes with arms straight up and ends the same.. so while it may look too quick, the end result is much more appealing and I don't think anyone is going to dock you for it.

We are using mecanim so the transition may be different than using the runtime... we don't do any mixing besides .1 second from Jump > Idle

Hahaha I know the GIF is a bit hard to understand, even though I captured it at 30fps, but I thought it would be the best way to explain my problem.

Majicpanda написал

This is one reason we don't use a fully animated jump animation for all bones. Ours starts with keyframes with arms straight up and ends the same..

I don't see how having the same start/end frames can help me here or how not animating the legs can solve my problem. It's just a rotation issue 🙁

So you don't know if there's any way to lock or constrain rotation? I think that would be a solution. I will try to modify the starting frame for the running cycle in the meantime.

Thank you both for your answers.

Our "jump or fall" animation starts and ends with the hands only straight up, so there is no rotation back to idle at all.. it's an instant transition. I actually have no idea how you're achieving this mixing and may be doing something "wrong" lol 😉 Obviously not mixing at all would solve your problem and maybe ours is so fast you simply see no transition.

Can you use IK to restrict movement only to so many degrees? You said you're using pro.. but not sure how you'd achieve it since we haven't yet started using IK ourselves.

I'm just using IK for the feet at this moment. I don't think that having no transitions is a bad idea, but maybe not the best solution for our robot, which is not supposed to perform fast actions, it has to look heavy and a bit clumsy ^_^

On the other hand, I'm using Spine's runtime mixing and it seems kinda simple, just pick the 2 animations to mix and establish the mixing time, I don't see how could I be doing this wrong, but who knows I'm still a Spine noob.

Let's see if someone has any ideas on rotation lock, if that exists in Spine at all 🙂

BinaryCats написал

ive only glanced at the topic but: IK Spinning 2: The ReSpinning possible same problem?

I'm not sure it's the same problem as I am not using IK on the arms, but I have a look at your approach just to be sure.
Anyway I kinda solved the problem by modifying the starting frame of the running cycle. Not ideal, but it does the trick for now.
Thanks!