MAXON CINEMA 4D: Cinema 4D Forum Adobe After Effects Forum

XPresso Question - On/Off depending on direction

COW Forums : Maxon Cinema 4D

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Tony BaroneXPresso Question - On/Off depending on direction
by on Apr 26, 2013 at 1:46:29 pm

New day, new problem!

I have a pretty simple animation setup with some Xpresso Nodes which turn a screw and move it along it's Y axis at the same time.

I have two sets of arrows on a ring to also indicate wether the screw is turning clockwise or counterclockwise.

Currently I have a User Data switch to control the visibility of either arrow.

Is there a way to setup something in my Xpresso Nodes which would turn on the visibility of the appropriate arrow when the User Data (Float slider) is increasing from 0% - 100% (and turning the screw clockwise). And then turn on the other arrow when moving the slider from 100% to 0%?

Thanks!



Return to posts index

Adam TrachtenbergRe: XPresso Question - On/Off depending on direction
by on Apr 26, 2013 at 4:28:24 pm

Another good puzzle! ;-)

The key here is the Memory Node which allows you to look back in time and determine a parameters value in the past. Once you get that past value it's just a matter of subtracting the it from the current value. Based upon whether the result is negative or positive you can tell if the object is rotating forward or backward.

File: 5920_rotationdirectioncontrolsvisibilitymemorynode.c4d.zip


Return to posts index

Tony BaroneRe: XPresso Question - On/Off depending on direction
by on Apr 26, 2013 at 6:05:18 pm

Thanks Adam! Perfect! No way I would have figured that one out.



Return to posts index


Brian JonesRe: XPresso Question - On/Off depending on direction
by on Apr 26, 2013 at 4:46:58 pm

try using a Memory node to remember what the slider value was last frame then subtract one from the other and change the arrow depending if the answer is positive or negative - edit - Adam got there first :-)


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]