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. Dismiss Notice

Opening a door with animator and no script

Discussion in 'Animation' started by verdekiwi, Nov 2, 2020.

  1. verdekiwi

    verdekiwi

    Joined:
    Oct 12, 2020
    Posts:
    5
    Hi There,

    I'm new to unity, and to coding. aaaaaand to solve the fact I don't know anything of coding, I'm working on the 2D/3D game kit unity provided.
    Great. now.

    I'm trying to animate a door.
    this tutorial show a very simple way to set trigger and action with pre-made scripts.
    3D game kit lite tutorial - part 2

    Door on the left (done with the game kit)
    my struggle is that I'm linking a door to a "pressure pad", but I want to animate the door back (closing) when releasing. Despite my effort, the effect is always that releasing the button the door will close, regardless is not fully open yet (skipping the animation of opening).

    How to solve that?

    Door on the right (done by me...)
    I'm trying on the side to do things with animator:
    simple door, animator set to open, set to close, transition, etc.
    I literally copied everything from the "pressure pad" of the game kit.

    buuuut. my door keep closing. endlessly. over and over again.
    and trigger doesn't work.

    what did I made wrong?






    any help is really appreciated.

    thanks
    Giulio
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,485
    You aren't going to be able to do that without some coding so I recommend you learn the basics at least.

    As for your problem, the Doors example in my Animancer plugin handles it by only using one animation to open the door and just playing that same animation backwards to close the door. The Speed and Time page shows how you can control the speed and time of animations in an Animator Controller, but it would be significantly more complicated than doing it with Animancer.
     
  3. verdekiwi

    verdekiwi

    Joined:
    Oct 12, 2020
    Posts:
    5
    Thank you very much for your reply, I'm going to check the links.

    I'm learning a little bit of code, but it's really a lot to digest without having any base.
    My target is to familiarise with unity and then go back to coding (or hire a coder in the first place)