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

Activators/Reactors - Tool for Triggering Animations without Code

Discussion in 'Works In Progress - Archive' started by LMan, Jan 16, 2017.

  1. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    This is a tool I've put together for some artists I work with sometimes, so that they would be able to set up their work functionality inside of a level without needing to wait for me to get around to writing the code to drive the Animator parameters.



    The idea is really simple-

    Activators trigger a UnityEvent, Reactors listen and set the appropriate values to the appropriate parameters, all through the inspector. No scripting necessary.

    Activator Example.png
    Above, a proximity activator- specify the layers to look for, and attach to an object with a trigger collider. The Event can be called on enter or exit. Delay is a time delay(in seconds) for firing the event.

    Other types of Activators-
    • Impact- Fires on collision, with an optional field for a minimum force requirement
    • Animation- Fires on an Animation state enter or exit.
    -----------
    Reactor Example.png ActReactAnimator.png

    Reactors allow you to specify activators that will be listened to, as well as parameters to be set upon the event firing. Bools have an additional option to simply invert the current value rather than set the same value repeatedly.

    noanimscripting.gif

    What do you think? Useful? Something better out there already?
     
    Last edited: Jan 19, 2017
    theANMATOR2b likes this.
  2. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,623
    there is a tool called itween... but you can start a new one better :)
     
  3. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    I have looked at itween in the past- but it requires scripting, and doesn't use the Animator or state machines.
     
  4. jaelove

    jaelove

    Joined:
    Jul 5, 2012
    Posts:
    302
    I need this :)
     
  5. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    Great to hear! Is there anything you think I should add?
     
  6. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,623
    there is a plugin from itween creators to make all those things without code... "iTween Editor" its very cool i have it and i dont write nothing...
     
  7. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    I had no idea! I'll have to check it out.
     
  8. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493


    I threw together this preview that tours the entirety of what I have so far.
     
    theANMATOR2b likes this.
  9. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    I took a look at the ITween Editor, and it looks very robust!

    A few differences I notice is that my package makes use of the Animator and Animation features of the Unity Editor, which means you can build state machines where animations trigger other animations.

    iTween also uses Unity Events to call methods- do you use this functionality often?

    I have to say, I like iTween's easing presets- I'm conflicted since the Animation window in Unity allows tweaking the easing curves manually, which is more flexible- but there isn't a straight "click and done" option to auto shape a curve to conform to an easing formula.
     
  10. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    Proud of my auto-formatting property drawer!

    ListDrawer.gif
     
  11. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    doorbell.gif

    All done with Animations, Activators, and Reactors. If you can set it up in the Animation Controller, you can drive it with A&R.
     
  12. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    Activator Logic.png

    I've expanded the concept of Activators to include evaluations- additional checks that can be added to an activator.

    For instance, a Proximity Activator's base evaluation can fire its event when an object enters the trigger zone. This will start an input evaluation that checks for a particular button press.
    Evaluation Demo.gif
    Activator w Evaluations.png
    Because there are multiple events per Activator, other objects can subscribe to different parts of an activator- in the gif above, the 3D text prompt is driven by the proximity activator's base event, and the door itself is driven by the post evaluation event.
     
    theANMATOR2b likes this.
  13. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    If driving the Animator with events sans scripting sounds like something you could use, I'm actually gearing up to enter a closed alpha testing phase.

    I'm seeking individuals to test drive the project, report bugs, and correspond with me a bit on how to improve it. This will all be done through a google group.

    Let me know if you're interested by sending me a message via the forums, posting here, or sending an email to macriluke0@gmail.com. Please include "Activators And Reactors" in the subject line.

    Thanks!
     
    IO-Fox likes this.
  14. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    Hit React.gif
    Stretching my animation chops to show off what you can do with an impact activator.
     
    theANMATOR2b likes this.
  15. alexanderameye

    alexanderameye

    Joined:
    Nov 27, 2013
    Posts:
    1,383
    Trigger system makes me think of the trigger system I use in my door tool. Good luck with the alpha!
     
    LMan likes this.
  16. mansoor090

    mansoor090

    Joined:
    Feb 18, 2018
    Posts:
    13
    would love to use it. is it out yet?
     
  17. LMan

    LMan

    Joined:
    Jun 1, 2013
    Posts:
    493
    I've put this project on hold- it couples really closely with the Animator component- which it seems is undergoing some exciting changes that i'd like to take advantage of.
     
    mansoor090 likes this.