Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

Animations played in Mecanim only, not on scenes

Discussion in 'Unity 5 Pre-order Beta' started by Tomza, Nov 8, 2014.

  1. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    I have sliding doors that open when the player goes onto a trigger (OnTriggerEnter). All worked well in Unity 4.X, but in Unity 5.0 the animations are played ONLY in Mecanim, not on the scene. In other words, the doors don't move though the animations are played. I tried to remove the properties and then made an animation again. This didn't solve the problem.

    Any ideas?
     
  2. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Have you verified that OnTriggerEnter is not the problem? (That is, try triggering the animation via something you know is reliable - like GetButtonDown or something)
     
  3. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Also, is your door set to Static?
     
  4. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    I made the Player View window small to see the animations in Mecanim. OnTriggerEnter works because when the character enter onto the door collider, Debug.Log shows a message and the sliding door animation runs. Runs but only in the Mecanim window. No move on the scene.
     
    Last edited: Nov 9, 2014
  5. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    I can add that legacy (non-Mecanim) animations work. I have problem with Mecanim animations only.
    And the Mecanim animations work in Animation Window - I see the move of the door on the Scene View too. No move in Play Mode.
     
    Last edited: Nov 9, 2014
  6. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    My Mecanim animations started to work! What did I?

    - I unchecked Apply Root Motion in the Aniamtor (Inspector)
    - be sure that the animated object arent Static (my animations weren't static, but when I checked to be Static, they did not work)
    Culling Mode have no influence.
     
    Last edited: Nov 9, 2014