How do I drag only one specific sprite if 2 sprites are overlapping each other?

0 favourites
  • 6 posts
From the Asset Store
Use inertion of your movements to throw, rotate your objects and etc. Objects can interact with others while dragging.g
  • I have 2 drag-and-drop sprites that overlap each other.

    And if I click on the place where the sprites overlap, then I need only one specific sprite to be dragged.

    In all other cases, sprites should be dragged independently of each other.

    How do I drag only one specific sprite if 2 sprites are overlapping each other?

    Ashley I need your help :) I have not found an answer to this question anywhere.

  • The drag & drop behavior already only drags a "specific" sprite (the top-most sprite based on z index), at least when I tried it.

    It's a bit unclear what exactly you're trying to do. Do you want to drag a different sprite than the one that was clicked?

  • I have 2 sprites on different layers.

    I can't swap the layers.

    There is a place where sprites intersect and overlap each other.

    I need only the sprite on the lower layer to be dragged when dragging in this place.

  • You can try it like this. If two or more sprites overlap, it will drag the bottom-most sprite. The dragging behavior is initially disabled.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It is impossible to establish drag and drop behavior in a family if sprites within the family have such behavior.

    Either the family can have a drag and drop behavior or sprites.

    It is not possible at the same time(((

  • You Try With Compare values

    like

    uid

    instance variable (true false)

    or Pick object by name

    example

    is touching sprite A

    A is = Touch true (added instance variable)

    drag drop enable

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