Partially circular sprite with physics behavior ?

Get help using Construct 2

Post » Sat Mar 28, 2015 9:29 am

Hi.

I want my character to have a shield shaped like this :
Image

It will have a physic behavior and I want a somewhat perfectly circular collision shape. It will also have random orientation (could be 0°, 40°, 157°…).
I guess this is not possible, but what is the best way to achieve such a thing ?

Plus, is it possible to make bullets pass through in one direction (from the inside) but bounce on the other direction ?
And would it be possible to make the bullet bounce inside instead ?

edit : I've came up with something like this which could fit. However there is an unexpected behavior :
When a bullet is not overlapping the shield, it enables the collision with the shield of ALL existing bullets. I tried to add a "foreach bullet" on my condition, but this doesn't work. Any idea ?

https://www.dropbox.com/s/g6or95kbobix2 ... .capx?dl=0
B
12
S
7
G
7
Posts: 448
Reputation: 4,272

Post » Sat Mar 28, 2015 11:22 am

Better doing it like this..

All you need to do now is to set the shield inner and shield outer to the same angle and position as the shield. I am sure you get the idea :)

Plus in future always check the collision polygon. You will get strange results if you cross the collision lines over.

https://dl.dropboxusercontent.com/u/1685424/shield.capx
B
47
S
16
G
9
Posts: 1,097
Reputation: 11,180

Post » Sat Mar 28, 2015 11:58 am

Thank you for your reply. I don't really like the collision polygon as a subtle difference between two impact point result in a very different trajectory.
That said, I guess this is the only way to have the bullets bounce inside. I'll see what solution I have to choose as I'm not sure if I want this behavior at this time.

The issue that I was talking about is still here : try messing around with bullets from behind, sometimes they bounce inside, sometimes they pass through. Why is that ?
B
12
S
7
G
7
Posts: 448
Reputation: 4,272


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests