Bullet sometimes jumps through instead of bouncing

0 favourites
  • 6 posts
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • 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 ____

  • 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

  • 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

  • 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.

  • 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

    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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)