Problem with bullet collisions with solids

Get help using Construct 2

» Mon Mar 25, 2013 11:20 pm

Hi, i want to make something like breakout or arkanoid so i made a prototype but i have some problems.

I used "walls" that are sprites with solid behavior, and a ball that is a sprite with bullet behavior.

The problem is that the physics arent realistic, for example, if the ball moves horizontally near the floor, and hit a wall, the logic is that the ball change the direction (from 0 degrees to 180 degrees) but the ball bounce in a strange manner and moves vertically near the wall. Another thing is when the ball hits a brick and the direction after the collision is wrong.

Capx with the first example:
https://www.dropbox.com/s/el0kg1drxh7kizo/test.capx

I tried changing the collision polygon but its the same. Any ideas for a realistic physics in this case?

P.D.: Sorry for my english :DByR2013-03-25 23:21:03
B
31
S
7
G
2
Posts: 157
Reputation: 3,735

» Tue Mar 26, 2013 5:44 pm

nobody?
B
31
S
7
G
2
Posts: 157
Reputation: 3,735

» Tue Mar 26, 2013 6:09 pm

Sometimes it takes awhile for someone with the time to look over a capx to get to it. Work, life, etc... tend to take precedence... don't worry, I am sure someone will get to look into it... usually I find that it has to do with the overlap of the solids or the shape of the collision polygon. If you draw a circle in paint, or something else and save it as a png with transparency and import it as your sprite, do you get the same behavior? Drawing your collision polygon in Construct still tends to have corners instead of real round edges...
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,393

» Tue Mar 26, 2013 6:33 pm

I tried with diferent polygon shapes, thats the first thing that i thought but all work the same. I tried without overlapping solids like you said, but the bounces didnt change neither :(
B
31
S
7
G
2
Posts: 157
Reputation: 3,735

» Tue Mar 26, 2013 7:01 pm

Have you looked at the Breakout tutorial?

Breakout
B
64
S
19
G
106
Posts: 3,108
Reputation: 65,081

» Tue Mar 26, 2013 7:37 pm

Yes, its harder to test but happens the same, if the ball go parallel to a wall, when it bounces with the next wall the bounce its in 90 degrees, not in 180 degrees.

And the wrong direction after a collision with a brick happens too.ByR2013-03-26 19:38:01
B
31
S
7
G
2
Posts: 157
Reputation: 3,735

» Tue Mar 26, 2013 8:09 pm

How about something along the lines of:
B
64
S
19
G
106
Posts: 3,108
Reputation: 65,081