How do I Make a Gap/Black Hole effect with 2 Sprites

0 favourites
  • 5 posts
From the Asset Store
A simple fun and stylish endless scroller game ready to be customized and published.
  • Hi guys, i have 2 sprites, the ball has the Physics behavior just to fall into the green hole Sprite...

    So i dont know how to make the "going through the hole" effect... like this

    I dont want it to make disappear the Ball when it overlaps the Green Hole, i want to make the effect like shown in the picture, how i can make this possible? i couldnt find anything related to this in the tutorials or manual

    maybe you know the logic / trick to make that effect with these 2 sprites let me know how to

  • Add a hidden sprite so it appears under the hole and fits exactly the shape of the bottom of the hole. Put the z order of this sprite above the ball z position so that, as the ball moves down, it will appear to disappear. Make sure the new sprite's color / pattern matches the image behind it and you won't see it - the example below uses a different color to highlight the image.

  • Thx, that will work fine for what i need

    but how about if the ball comes from the bottom? I think i would need to invert the trick and put another "invisible" sprite at the to make the trick then i need to get where from is coming the ball, if from the top or bottom, and finally applying the z-order to the respective bottom/top sprite...

    and when the ball complete overlaps that invisible sprite, destroy it or make it spawn in other location as a Portal game hehe, i will post a capx later

    thx again ill try that and the idea i got from your reply...of course any other method is always welcome

  • use the Z-order when the ball overlap the "extra hidden sprite"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • this is what i done...just for test purpose...for the overlaping Edges when coming from another angle/side ill be looking the solution for that,to make the "hole effect" around in 360 degrees no matter where it comes from

    heres the capx, you can drag/drop the ball for test

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