Custom collision polygon ignored

Bugs will be moved here once resolved.

Post » Mon Jul 08, 2013 12:30 pm

Link to .capx file (required!):
http://sdrv.ms/1aRSf6f

Steps to reproduce:
1. Create a player sprite (50 w, 25 h) with a custom collision polygon such that the nose of the player sprite falls inside the sprite's bounding box. Assign the behavior "8Direction" to the sprite.
2. Create a wall sprite (9 w, 147 h). Assign the behavior "Solid" to it.
3. Create another instance of the wall sprite. Set its Angle to 90.

Observed result:
The collision is correct when the player sprite collides with the non-rotated (Angle=0) wall sprite (i.e. the player sprite stops when its nose hits the wall sprite).

When the player sprite collides with the rotated (Angle=90) wall sprite, the player sprite stops when its bounding box hits the wall sprite and not when its nose hits the wall sprite.

Expected results:
1. Collisions with sprites work uniformly regardless of Angle.
2. Collisions use the collision polygon instead of the bounding box.

Browsers affected:
Chrome: Not tested
Firefox: yes (v 22)
Internet Explorer: yes (v 10)

Operating system & service pack:
Windows 8 Pro 64-bit

Construct 2 version:
Release 132 64-bit
    
B
5
S
1
Posts: 5
Reputation: 339

Post » Mon Jul 08, 2013 2:01 pm

Can't reproduce, collisions still look like they work properly with rotated sprites. I think you're just confused by the way the 8-direction behavior is handling collisions with these sprites. Construct 2 is used for hundreds of games, and if rotated collisions didn't work, I'm sure we'd have heard about it long ago.
Scirra Founder
B
382
S
223
G
86
Posts: 24,002
Reputation: 189,821

Post » Tue Jul 09, 2013 7:44 am

Ashley,

Thank you for taking a look at my report so promptly, however, your Jedi mind tricks won't work on me. I'm not confused about 8-dir behavior and just because someone hasn't found a particular bug doesn't mean it's not there.

In fact, I find your lack of faith disturbing. Seeing is believing so I made a video demonstrating what I am observing. I uploaded the video to Skydrive in the same location as the .capx file. Here's that link again for your convenience.

Examples uploaded to Skydrive

Right-click on the video to download it or left-click to play it in your browser.

Thanks!

Paul

p.s. In case it's not clear, the tone of this reply is intended to be humorous.
B
5
S
1
Posts: 5
Reputation: 339

Post » Tue Jul 09, 2013 9:13 am

@Radish it works as expected in r137. Have you tried the beta?
Moderator
B
72
S
14
G
11
Posts: 900
Reputation: 11,910

Post » Tue Jul 09, 2013 9:27 am

@Radish - I cannot reproduce any issue. The collision mask is clearly not ignored in the place you describe. The 8-direction behavior does treat collisions slightly different for the two surfaces, but that's just due to the solid detection algorithms it uses, and doesn't mean collision masks aren't working.
Scirra Founder
B
382
S
223
G
86
Posts: 24,002
Reputation: 189,821

Post » Tue Jul 09, 2013 1:57 pm

thehen, I will try the beta. Thank you for the suggestion.

Ashley, did you watch the video I uploaded?

Paul
B
5
S
1
Posts: 5
Reputation: 339

Post » Tue Jul 09, 2013 2:43 pm

thehen, the issue is fixed in the latest beta (r137). Thanks again for your suggestion.

Ashley, fyi I was able to reproduce the problem on several computers. I also exported the project as an HTML 5 website and opened that on different computers as well and still had the problem. As noted above I do not see the issue with r137 beta, i.e. the pointy end of my collision poly now goes right up to the sprites (which is the desired and expected behavior).

Paul
B
5
S
1
Posts: 5
Reputation: 339


Return to Closed bugs

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest