a drag&drop object disappears when collides

0 favourites
  • 5 posts
From the Asset Store
112 High-Quality destruction sounds for videogames
  • drive.google.com/open

    can someone tell me why this happens?

    when i drag the object to collide with a solid wall it disappears.

    both objects are solid.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's because the paddle has 8-Direction behavior, and objects with 8-Direction behavior can't overlap Solid objects. It doesn't actually disappear, it jumps to the left or right edge of the wall.

    If you want to limit the movement of your paddle, you should use an event like this:

    Paddle is dragging -> Paddle set Y to clamp(self.y, 100, 600)

  • thanks

    i tried and it works but if i enable the 8 direction (up & down) it still does it,sure i can disable the 8 direction but i want it ,mostly for testing(because i can't use to mice).

    8 direction and drag don't go together?

  • They can work together if you are not using them both at the same time, or if you are not dragging your paddle over any solid sprites.

    You can add another event - if paddle is dragging, disable 8direction, else enable 8direction

  • i was just going to edit my last reply when i saw your answer.

    thanks for the fast response!

    in fact i fixed it by clamping the x too.

    so i don't need to disable the 8 dir. :)

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