Bullet sometimes jumps through instead of bouncing

Bugs will be moved here once resolved.

Post » Sun Jan 04, 2015 10:20 am

Problem Description
Make a triangle of three thick blocks and put a bullet inside. The bullet starts bouncing but after a few seconds it jumps through the upper corner although the blocks are extremely thick and the bullet has a low speed: 1 .

Attach a Capx
____ collission test.capx____

Description of Capx
____see description above ____

Steps to Reproduce Bug
    Just start up and watch, problem occurs within 10 to 60 seconds

Observed Result
____ After a while bouncing suddenly fails and jumps through the upper sharp angle____

Expected Result
____ That it stays bouncing ____

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
____ Windows 8.1 ____

Construct 2 Version ID
____ Release 190 (32 bit) november 25 2014 ____
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 4
Reputation: 183

Post » Sun Jan 04, 2015 11:28 am

This occurs with Release 192 as well .
As I already mentioned, it always occurs when the bullet reaches the upper corner of the triangle. With a square, it is much more difficult to generate the problem...

Eric
B
3
Posts: 4
Reputation: 183

Post » Sun Jan 04, 2015 10:11 pm

In the mean time, I found the root cause of the problem: the sharp bullet gets stuck in the triangle's corner and can not rotate anymore. Apparently, the bouncing algorithm has no strategy to solve this properly and lets the bullet escape through the wall instead.
When I reshape the bullet to a small circle (that can not stuck anymore), the problem doesn't occur anymore...

Eric
B
3
Posts: 4
Reputation: 183

Post » Mon Jan 05, 2015 5:58 pm

I don't think there's much we can do about this: since 'Set angle' is 'Yes', the object has to also rotate in the direction it bounces off. In a very tight angle like in your demo, setting the angle to the bounced direction may then mean it's still overlapping the solid, and then it runs out of options. I'd recommend having 'Set angle' set to 'No' and place a rotating sprite on top of it to get the same appearance.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,238

Post » Mon Jan 05, 2015 6:58 pm

Thanks for the quick reply. I just started with Construct 2 (as a frustrated clickteam user) and it's a real relieve working with it. I'm impressed :-D

Concerning this bouncing issue, I still wonder whether it wouldn't be more intuitive that the bullet just jumps back in the direction it came from than jumping through?

Eric
B
3
Posts: 4
Reputation: 183

Post » Mon Jan 05, 2015 7:02 pm

It's still not always possible if the angle has changed and it's too big to fit in its current position or indeed anywhere within a few pixels in any direction. In this case it considers itself trapped and resorts to a find-the-nearest-gap algorithm which works in an 8-direction pattern and probably doesn't find the nearby gap because it doesn't align with any of the directions it's searching down.

Changing the angle on bouncing in a tight area is a really complicated problem, the best thing to do really is to just not change the angle!
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,238


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests