Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mecanim: changing animation but keeping current object values

Discussion in 'Animation' started by Eugenio, Oct 24, 2014.

  1. Eugenio

    Eugenio

    Joined:
    Mar 21, 2013
    Posts:
    197
    Hi forum :)
    I'm trying to use mecanim to create a present and dismiss controller.
    In the project I uploaded you can see that is really simple to realize.
    What I don't like is that if I'm in the middle of an animation, I cannot switch to the other by starting from the current state of the gameobject.
    I explain it better: if I decide to present the cube, but, I want to dismiss it when it is still in the middle of the present animation, the cube will not keep the middle position but it will spawn from the initial position of the dismiss animation (that is the final position of the present animation) and then perform that.
    Still confused? Well... let's say that I would like to play ping-pong by keeping presenting and dismissing the cube letting it to present and dismiss without letting it to complete any of the animations.

    How can I achieve that? I really don't know if it's a script problem, an animation bad designed or even if the animator is not correctly set.

    Thank you very much for the help :)
     

    Attached Files: