Hit Detection in RP9

Is it possible to detect when two objects/panels come in contact with each other?

1 Like

Hi ledtear!

You can do this with some conditional logic that checks whether a widget “is over” the area of another widget. For example, if you had a dynamic panel that moved with drag, you could add some additional cases to the Dragged event that check whether the dynamic panel is over the area of another widget. If it is, it could fire one case’s actions. If it isn’t, it could fire a different case’s action. I’ve attached a sample file where dragging a dynamic panel over a placeholder widget shows a button on the page. When the dynamic panel isn’t over the area of the placeholder, the button is hidden.

area-over-widget-sample.rp (49.1 KB)

More information on dragging dynamic panels can be found in our tutorial here, and you can learn more about conditional logic here.

I hope this helps!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.