How do I prevent from dragging underneath object

0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I have a object with Drag&Drop, and I can "take" even if it is underneath another object. So even if I have another object above him, and I am not seeing him, I can drag it.

    I would like to make impossible to drag the object if it is underneath another object. And if it is underneath another object but I can see just a part of him, I would like to drag the object only if I click in the part that I can see.

    I hope I could explain it right. There is a way to do it? Can you point me what I should do?

    I appreciate any suggestions : )

  • Is working good for me here as longs both objects have the Drag & Drop behavior, I couldn't manage to reproduce your error, so from this I assume the top object hasn't got Drag & Drop behavior because is when I noticed it's happening.

    so I have been playing with it and looks like a bit tricky, I manage to do this but I'm not sure if it will help you, I'm sure some one else can do it a lot better.

    The top object "blue" is the one that doesn't Drag

    https://www.dropbox.com/s/h6sfa9a6r5zxfc8/DragTopInstance2.capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi

    Thanks men, and sorry for the late response, I am back now.

    This method didn't work right in my game, but you gave me the theory I needed, I will work on another way of doing it.

    Thank you, be blessed ; )

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