Ondrag DP 1 to move DP 2 in the opposite direction

Hi

I have a DP that you drag along the x axis which moves another DP. But I want the other DP to move in the opposite direction i.e. -X. Does anyone know how to do this?

Thanks in advance.

Hi!

This works:

Move otherDP by [[-DragX]] , 0

I have on the DP that controls the other DP:
Move otherDP with drag x

There is no option to edit or add the above. Do I need to set a variable?

Hi!

DragX is the distance the thing you are dragging has moved since the previous OnDrag interaction. (OnDrag fires constantly the whole time you are dragging.) Putting it in double brackets makes it an expression.

Here is a sample file.

drag_opposite.rp (60.8 KB)

Ah cool. That works.

Cheers