Hello everyone, I prevent a perplexing problem.
Let's say I have two click-and drag nodes, with a bar that always extends between them. A simple matter to program.
The nodes can be dragged around the layout at will and the bar will always extend between them (simple programming).
Now, in the context of this arrangement, there will be some walls/obstacles in the layout.
How can I program the arrangement so that the user can never position the system so that any object (nodes or bar) intersects any wall?
Here's a capx of the example. It's pretty simple as I haven't implemented any sort of collision prevention.
So, what do you think I should do? I thought of using physics, but that brings problems with clicking and dragging...