Forum rules - please read before posting.

Mecanim unwanted transition

(I think this is something which AC controls as I've looked for methods to solve this on the general Unity/Mecanim documentation.)

The situation is this:

I have a rotating "turntable" object which I have set to use an animation clip which is looping a 0-360 degree rotation.

I also have 4 static state animations for 4 different statically rotated positions. I want the player to be able to stop the turntable and have it rotate to one of these 4 positions. These static states are also in the same transform axis (rotate) as the looping clip.

I have set up action lists for each of these outcomes but I can not get Mecanim to just STOP the turntable loop and head straight into one of the 4 static points: It wants to finish the loop clip first and starts engaging the static clip at the same time. This appears to result in conflicting animation calculations and the rotation goes to a very slow crawl instead of the state desired.

My Actionlists use OBJECT: Animate to instigate each positional state.

I have tried a number of ways to stop the turntable but it seems to always want to 'complete' the anim and I see no way of stopping it's loop mid-way.

Am I doing this the wrong way altogether?

Thanks.

Comments

  • Personally I would use a script to handle the rotation, as I'm not sure Mecanim is intended to be used like that.  I'm likely wrong, though.

    Are you using parameters to transition to the static clips, or choosing "Play custom" within the Object: Animate Action?  If you have transitions, you may have to uncheck "Has exit time" on them.
  • I'm using "play custom". Not using parameters (yet). Perhaps I should try. Any hints on how that would best work?

    Is there a way to use Legacy Anims? I tried to use it but I seem to need an animator object which can't be animated from scratch within Unity 5. I guess that's literally only for compatibility with old Unity projects.
  • The 3D Demo still relies on Legacy animation, so I think it's still possible.  The animations are imported from external FBX files, however.  I do know that if you enable Debug mode in the Inspector (top-right) and select an animation clip, you have a "Legacy" checkbox.

    So far as parameters go, I'd recommend using Trigger params to switch to each of the 4 states.
  • Once you mentioned anims from FBX I set up my rig in Maya instead but it didn't quite do what I wanted.

    I solved the original setup by simply adding more keyframes to the mecanim rotate 'turntable' state. This seemed to let the transition between static points and the rotate loop break out sooner.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.