Collision problem

Discussion and feedback on Construct 2

Post » Thu Jun 07, 2012 12:13 pm

I am making a Breakout style game for my grandson. Everything is going well apart from one problem. I have the ball set as solid and the bat unchecked for solid. I have set up my own formula for adjusting the bounce angle of the ball depending on where it hits the bat. The ball has the bullet behaviour. Sometimes when the ball overlaps the bat the ball goes straight through. Would I be better making up my own custom movement for the ball or is there some way round this problem?
B
27
S
2
G
3
Posts: 61
Reputation: 2,498

Post » Thu Jun 07, 2012 1:03 pm

Why didn't you set the bat as solid?
Maybe it's a silly question but I really can't figure why... Knifegrinder2012-06-07 13:05:17
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Thu Jun 07, 2012 1:09 pm

I tried it as solid as well and the same thing occurs. It doesn't matter if you set the condition to overlapping or colliding, the same thing occurs.
B
27
S
2
G
3
Posts: 61
Reputation: 2,498

Post » Thu Jun 07, 2012 1:21 pm

I had this issue, but only when objects speed were very high and fps very low (phonegap on android).
Try to set a four-point square as collision polygon for the ball and make solid the bat.
If the ball is perfectly inscribed in this square theorically you'll not notice any difference in the gameplay.
B
11
S
3
Posts: 224
Reputation: 2,028

Post » Thu Jun 07, 2012 1:41 pm

Use CustomMovement for the ball and you can check for collisions every few pixels. That's what I'm doing in my breakout game.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,000

Post » Thu Jun 07, 2012 3:11 pm

Knifegrinder- How do you setup the collision polygon like you described?
B
27
S
2
G
3
Posts: 61
Reputation: 2,498

Post » Thu Jun 07, 2012 6:09 pm

Image editor -> Third icon from top
B
11
S
3
Posts: 224
Reputation: 2,028


Return to Construct 2 General

Who is online

Users browsing this forum: Andres941, tayxd, TheRealDannyyy and 9 guests