Why Drag and Drop is not working right with solid object ?

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hello everyone,

    the Drag and Drop acts weird when its in Collison with a Solid Object.

    Check this the video first:

    Subscribe to Construct videos now

    see the green shape is going above the solid object, I want the green object not been able to go outside the big box or inside the small box. I want the Drag and Drop act like the Movements Behaviors (8 Directions, Platform, ...etc) where it won't go over the solid object.

    something like this:

    Subscribe to Construct videos now

    Thank you in advance

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The trick is you need to check the positions from where you start dragging to where you want to drag to and stop short of the first overlap. As is the drag and drop behavior teleports the object so the 8dir collision response will only push out the closest direction and has no knowledge if it jumped through walls.

    One possible way:

    dropbox.com/s/73awi7luxpqyji7/drag_notThroughWalls.capx

  • The trick is you need to check the positions from where you start dragging to where you want to drag to and stop short of the first overlap. As is the drag and drop behavior teleports the object so the 8dir collision response will only push out the closest direction and has no knowledge if it jumped through walls.

    One possible way:

    https://www.dropbox.com/s/73awi7luxpqyji7/drag_notThroughWalls.capx?dl=1

    Thank you so much that really helped :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)