Trying to do something weird with sprite collisions.

Get help using Construct 2

Post » Tue Sep 23, 2014 12:47 pm

I am actually attempting to make 2 instances of the same sprite behave like solids without using the solid behavior. Currently, they have a platform behavior attached. The sprites are being used as enemy containers, with spriter animation skin overlays positioned to both each tick. The problem I'm having is when the two instances of the the container collide/overlap. Sometimes when they literally cross paths, the instances "swap" skins because I'm using pick nearest to assign each skin to its container. It's happening far to often to ignore. I tried making each of them solid but combined with the platform behavior, it punches my frame rate right in the windpipe. I'm dropping form 58 fps down to 19 just by adding the solid behavior. I tried writing a collision action that forces the containers away from each other when they collide or overlap, but the problem I have there is that I'm using their traveling direction to determine which way they should "bounce" off of each other. If they both happen to be traveling in similar directions when they collide, weirdness happens. I've been running at this for two days, and I think I'm too close to the problem to see the solution right now. Any help will be greatly appreciated.

http://www.crunchpickle.com
B
15
S
2
G
2
Posts: 96
Reputation: 1,118

Post » Tue Sep 23, 2014 12:51 pm

Instead of using pick nearest wouldn't pinning them work?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Sep 23, 2014 1:04 pm

I haven't used the pin behavior before. From my quick reading, it looks like it could solve the swapping part of the problem. I still need to keep them from overlapping/figure a way to properly bounce them off of each other on collision. It's largely a style decision, but I want the creatures to feel solid.
B
15
S
2
G
2
Posts: 96
Reputation: 1,118

Post » Tue Sep 23, 2014 1:09 pm

I can't have a look due to network restrictions, but would using is overlapping at offset or using a detector sprite in the direction of travel be of any help?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Sep 23, 2014 7:39 pm

Possibly. I'll try pinning them together when I get home. It might make the rest of the problem easier to solve. Thanks for the tips.
B
15
S
2
G
2
Posts: 96
Reputation: 1,118


Return to How do I....?

Who is online

Users browsing this forum: el3um4s and 10 guests