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

Question Door Animation works in preview, but only collider moves in game.

Discussion in 'Animation' started by 15north97, Jun 4, 2021.

  1. 15north97

    15north97

    Joined:
    May 3, 2020
    Posts:
    5
    Hello,

    I'm working on a simple swinging door, and I'm having trouble getting the door mesh to move when in-game. In the preview, the door swings open and closes like normal, but when I start the game, the door opens automatically (another issue) but only the collider moves. The mesh is in the same place but now you can walk through it.

    I have a trigger component being used to detect when the play is near the door.
    upload_2021-6-4_15-9-16.png

    Then I have a door component that has the animator attached and the mesh as a child
    upload_2021-6-4_15-9-42.png

    And then the mesh itself.
    upload_2021-6-4_15-10-53.png

    Here is the animator
    upload_2021-6-4_15-11-36.png