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

Get help using Construct 2

Post » Sat Mar 22, 2014 5:35 pm

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

Image

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 :D
B
13
S
2
G
1
Posts: 28
Reputation: 960

Post » Sat Mar 22, 2014 7:39 pm

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.
You do not have the required permissions to view the files attached to this post.
A big fan of JavaScript.
B
76
S
20
G
74
Posts: 2,253
Reputation: 46,480

Post » Sat Mar 22, 2014 8:24 pm

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 top...so 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 :)
B
13
S
2
G
1
Posts: 28
Reputation: 960

Post » Sat Mar 22, 2014 9:07 pm

use the Z-order when the ball overlap the "extra hidden sprite"
B
38
S
13
G
4
Posts: 152
Reputation: 5,147

Post » Sat Mar 22, 2014 10:37 pm

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 ;)
Image

heres the capx, you can drag/drop the ball for test
https://drive.google.com/file/d/0BzotF1ti-huRbWpra3JaNFN2djg/
B
13
S
2
G
1
Posts: 28
Reputation: 960


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider] and 25 guests