still issues with colissions of rotated sprites?

For questions about using Classic.

Post » Sun Jul 26, 2009 3:17 pm

I'm getting strange colission detection results in my side-scrolling platformer what the characters are facing left. (rotated to 180 with auto mirror on)

Should I bother continuing to debug or are there still known collision issues?

thanks
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Post » Sun Jul 26, 2009 3:33 pm

As far as I know it works perfectly. Post a .cap showing some rotated objects giving false positives/false negatives.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Sun Jul 26, 2009 3:54 pm

Thanks for the info. I'm sure you're right and I'm just doing something wrong. I just didn't want to keep pulling my hair out if there were known issues. I'll keep trying to debug, starting with making a simple CAP which only includes flipped and animated sprites overlapping with each other.
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Post » Sun Jul 26, 2009 5:47 pm

Actually, I just made a really simple CAP to demonstrate my problem and theres still a HUGE collision detection problem. :(

heres the CAP: this was made in version 99.4.2 BUT this problem existed in at least the previous version as well...
[url:csel0pc9]http://www.holymonkeystudio.com/projects/overlap%20bug.zip[/url:csel0pc9]

use the arrowkeys and to walk behind the enemy, then turn around and use the "Z" key to attack it. you'll see that you nearly have to be standing completely inside the enemy for the overlap to be detected... yet from the front (the left side of the screen, the overlap is detected perfectly)

Theres just the one event (line of code) for the colission. :(

Am I possibly doing something wrong or is this inded a bug. If its not a bug, why is it acting differently from the right side?

thanks,

Mike
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Post » Sun Jul 26, 2009 7:29 pm

It looks like the collision is being based on the mask for the default animation (the one you've named "idle"). So the collision mask is flipping, but it's using the wrong collision mask.

Yeah, I'd say it's a bug. Too bad this wasn't found before marking the release as stable :P. Anyway, you should post a bug report, if one hasn't been posted already.

There are a couple workarounds you could do in the meantime. You could check collision based on a separate sword object (which would probably be more accurate anyway), or you could create manually flipped left-facing sprites for the 180 angle for all of your animations. The second one isn't exactly the most efficient solution, I know, but it's something, anyway.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Jul 26, 2009 8:52 pm

I was thinking there was a bug in collisions as well. When I was making the example .cap for the hashtable object on the wiki, I could not get Construct to detect that sprites had collided. I had to make one of the sprites non-solid so that the collision would occur. If you download the .cap from the hashtable example and turn on solid for the other sprites you will see what I mean.
B
8
S
3
G
7
Posts: 835
Reputation: 5,313

Post » Sun Jul 26, 2009 9:46 pm

I told you guys there was still bugs with this like, a bajillion years ago. :mrgreen: I believe it has to do with floating point positions, but I could be wrong.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests