TransWikia.com

Is there a "latch" node in animation nodes?

Blender Asked by user2824371 on January 21, 2021

I need a Boolean node that does the following. If the input is true at any time, the output becomes true and stays true. Even if the input is removed or becomes false, the output must stay true. It’s like detecting a pulse or touching a button then walking away and the bulb doesn’t turn off when you walk away.

By nature, the node should have another input to turn it off.

Is there a node that does that in animation nodes? If no, Is there an easy workaround?

Thank you,

One Answer

You can use a custom property on an object to do it :

Create a new empty and set your node tree like so :

enter image description here

Now when you toggle the boolean input, the custom property is updated and persists between frames.

enter image description here

Now there may be more efficient ways to rig it but your latch logic boils down to :

enter image description here

In action :

enter image description here

Correct answer by Gorgious on January 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP