[Solved] How do I make a custom bullet ricochet?

Get help using Construct 2

Post » Fri May 20, 2016 9:03 pm

I'm trying to make a custom ricochet with events as the standard bounce of solids is not exactly what I needed. I want my "bullet" to ricochet only if hits the solid at an angle further from the perpendicular of the solid. Closer to the perpendicular it would not ricochet.

Any idea how I would go about that?

And Is there any way to get the angles between the points on a solids colission polygon?

Image
Last edited by tunepunk on Mon May 23, 2016 2:16 pm, edited 1 time in total.
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
18
Posts: 1,024
Reputation: 13,345

Post » Fri May 20, 2016 9:53 pm

B
22
S
4
G
3
Posts: 64
Reputation: 2,689

Post » Fri May 20, 2016 11:03 pm

Thanks for the example. It kind off works, but i think i have to work the other way around, since i have all kind of different shapes of colission boxes. So probably....have to give the bullet a variable like "direction", which is set when its fired. If the direction of the bullet changes (Bouncing off) & if the change is smaller than "Bullet.direction" +/- 15 degrees, go ahead bounce(do nothing).... Else destroy.
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
18
Posts: 1,024
Reputation: 13,345

Post » Mon May 23, 2016 2:16 pm

Image

Solved it. This seemed to work exactly how i wanted. Sharing if anyone else finds the solution useful.
Follow my progress on Twitter
or in this thread Archer Devlog
B
41
S
18
G
18
Posts: 1,024
Reputation: 13,345


Return to How do I....?

Who is online

Users browsing this forum: antonajadah and 4 guests