Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D XPresso Question – On/Off depending on direction

  • XPresso Question – On/Off depending on direction

    Posted by Tony Barone on April 26, 2013 at 1:46 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!

    Tony Barone replied 13 years, 3 months ago 3 Members · 3 Replies
  • 3 Replies
  • Adam Trachtenberg

    April 26, 2013 at 4:28 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

  • Brian Jones

    April 26, 2013 at 4:46 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 🙂

  • Tony Barone

    April 26, 2013 at 6:05 pm

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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy