Setting a Reaction Between Two Objects Using Xpresso

Julian Field posts a look at using Xpresso in Cinema 4D to link together a pump and pressure gauge. The idea is that when you move the pump up and down, you will see a respective change to the pressure gauge- In this example the gauge will read a clockwise rotation.

Julian shows how to restrict the movement of a simple representation of a stirrup pump to vertical motion, and then moves on to setup a comparison of values using the C4D Xpresso Vector2Reals node. The final network also utilizes a condition node that is set to decide between the moving gauge indicator, or the stationary one.

The logic behind the Xpresso that makes it work comes in three discreet stages: a clamping stage that restrict the vertical movement of the driver object,  a stage that compares two values by asking a question, and finally a conditional section that will allow to choose between two states.