Is there a better plugin for bouncing off a wall

Get help using Construct 2

Post » Sat Nov 26, 2016 5:47 am

I am trying to use the physics engine for ricochets off a wall but it's acting really strange. If I bounce off the wall at a real shallow angle it comes off the wall the right direction. If I come at the wall at anything steeper then about 20 degrees the ball just comes straight off perpendicular to the wall like I am just standing there facing it and bouncing a ball. Are there any settings in the physics to make this work better or a different plugin I can use?
B
6
S
2
G
2
Posts: 6
Reputation: 1,462

Post » Sat Nov 26, 2016 8:09 am

Use simple math (no physics required) for correct bouncing angle:
alextro wrote:update #2 shoot da babble02.capx
Image
With this math expression no matter which side wall facing, bouncing direction always at correct angle.So Placing and rotating the wall freely make more sense now.

Image
The same method applied to shooting line "laser". only for laser we put another instance as if it bouncing off previous one.
ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480

Post » Sat Nov 26, 2016 12:13 pm

@alextro Oh, very cool. Thanks a lot for creating capx and gif files. Very helpful. :-)
B
34
S
9
G
4
Posts: 206
Reputation: 8,351

Post » Sat Nov 26, 2016 5:44 pm

Thank you for the example.
B
6
S
2
G
2
Posts: 6
Reputation: 1,462

Post » Sat Nov 26, 2016 8:59 pm

Thanks, being looking for something like this.
B
13
S
3
G
2
Posts: 38
Reputation: 1,428

Post » Sat Nov 26, 2016 9:44 pm

Not a big deal, it came from my previous WIP of bubble shooter : viewtopic.php?f=180&t=164607
ImageImage
B
114
S
51
G
24
Posts: 790
Reputation: 23,480

Post » Sat Nov 26, 2016 11:11 pm

Absolutely superb, thank you for the link.
B
13
S
3
G
2
Posts: 38
Reputation: 1,428


Return to How do I....?

Who is online

Users browsing this forum: LunaticCat and 6 guests