Skip to content

Triggered Time with Curve

Swap and exchange your logic containers here

Triggered Time with Curve

Postby bigSky » 10 Feb 2013, 07:15

This container lets you control a value, over time with an animation curve.
It takes an event (single pulse) and a normal trigger as input, and any animation curve (between t=0 and 1) to drive output values (think custom eases and "nice" animation control).

Input variables:
Time - (how long you want the event to last) (float)
Use curve - (do you want to use a curve, or just use linear interpolation?) (bool)
Animation curve - (double click to edit)
Value - (What number you want to reach in the time specified)? (float)
Looping - (do you want it to loop, or not)? (edit in runtime!) (bool)
Count up
Count down
0-1Up (normalized count)
1-0Down (")
Evaluated Curve - (the result from sampling the custom animation curve) (all floats)

and exits are when playing / when started /when stopped, and a normal out trigger. Useful for when ITween doesn't do it.

(14.4 KiB) Downloaded 85 times

(Hints for animation curve control that aren't so well documented in Unity:
right click on a curve lets you add a key there.
right click on a key gives you individual control of the tangents.
Cmd/Ctrl + drag lets you "snap" to values.
Scroll + cmd/ctrl gives you zooming only in X.
Scroll + shift gives you zooming only in Y.
Option + right click lets you pan.)

Hope you can open it - some of these posted containers seem funky. Suggestions and edits are most welcome.
Posts: 126
Joined: 05 May 2011, 22:57

Return to Containers

Who is online

Registered users: Yandex [Bot]