Prevent dragged sprites moving through each other

0 favourites
  • 5 posts
From the Asset Store
Antisuspend Plugin for Construct 3 prevents the runtime from getting suspended.
  • I have a game piece with the drag-and-drop behavior. I want to prevent the pieces from moving through each other. Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This can actually be a little complex depending on the shapes/angles of your objects. If they are all horizontal rectangles you might be able to hack a solution but if not it will be a little harder.

  • My pieces are circles.

    Are there other behaviors one can download?

    Edit: Alright, I made them solid, 8-directional, Physics/immovable. Now, they won't go through each other, but sometimes they'll move each other. It's like there's a hierarchy of which piece can move another...

  • I don't think there's a behavior for this as it's rather specific.

    Circles, eh? hmm. As Ashley said in a similar question I asked the other day, the most realistic solution is to have the shape go red whenever it's overlapping another shape, showing invalid placement. Of course, I don't know your game so there's a chance it won't work for gameplay reasons.

  • Did a little more testing, and there's definitely a hierarchy involved. Instances of the pieces can move pieces created before them, but not created after them.

    Why would this be?

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