How do I let a sprite (ball) roll through another sprite

Get help using Construct 2

Post » Thu May 29, 2014 5:41 pm

Hi there,

i have two sprites: a ball sprite and a pipe sprite.
on the ball is physics enabled: how can i determine if the ball is "in" the pipe (not half inside, i want it fully inside of the sprite)??
Is this something with overlapping at offset? i didn't find any suitable information about the offset overlapping.

thanks for any advice :)
B
5
Posts: 18
Reputation: 263

Post » Thu May 29, 2014 6:00 pm

What do you want it to do in the pipe? Roll through it?
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Thu May 29, 2014 6:09 pm

yepp, roll trough itone is vertical (entry of the pipe), the other is horizontal
B
5
Posts: 18
Reputation: 263

Post » Thu May 29, 2014 6:25 pm

So what I would do is make the pipe out of three sprites. Create two line sprites to represent the sides of the pipe. Then overlay a decorative sprite of the pipe over them. Then tell the ball to ignore physics of the decorative sprite.
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Thu May 29, 2014 6:25 pm

hmm simple but good idea. thanks :)
B
5
Posts: 18
Reputation: 263

Post » Thu May 29, 2014 8:28 pm

well a better way is to use the hitbox from the editor ;)
B
5
Posts: 18
Reputation: 263


Return to How do I....?

Who is online

Users browsing this forum: elafreat, facecrime, Yahoo [Bot] and 32 guests