Custom Restrain Areas



  • Hello,
    It would be super helpful to have a custom restrain area.
    I am trying to make an app, where you can drag an object around.

    However, when you make an object not passable, you can still drag a different non passable object over other non passable objects

    The restrain area is awesome, because you can make a square that you can drag an object in, and if your finger goes out of the area, the object will still follow your finger but stay inside the restrain area.

    A custom restrain area would be perfect



  • @Davio This feature has already existed for awhile.

    You can easily find it and turn it on in the properties of a Drag & Drop behaviour and visually select the constraint area by pressing "Draggable Area".

    0_1537436521348_D2AB9467-D314-4477-BB6F-93D387ED768E.jpeg

    0_1537436593557_9842E69E-6D98-45A6-911A-0DAF9FB99620.png



  • @Kamdroid Yeah, I've seen that before. I was wondering if you could make constrained areas with larger polygons instead of rectangles



  • @davio For having a custom constrain shape, you could try building invisible (or not invisible) wall objects that block your draggable object (dragged object must be physics). I just wonder whether you might run into the issue of squishy physics allowing the object to push through if you drag too far outside the area.



  • That might work, but he also wants a solution that will work if he has his object passable.



  • Would be a little tricky, but you could make it non-passable and then use the Ignore Collisions behaviour on every object that it passes through.