Bullets bounce unrealistically in corners

0 favourites
  • 5 posts
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • Does anybody know the reason bullets bounce and strange angles in corners? Also any way to overcome it?

    Here is an example:

    freegames.org/files/vids/bounce.mp4

    There are solid shapes around the boundary of the screen. With the bullet hitting the corner you would expect it to hit both surfaces and come back the same direction. You can also get some odd bounces hitting external corners too.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try to make the collision polygon as round as possible. If this doesn't help, you have two options:

    1. use Physics with circle collision mask.

    2. use raycasting feature of LOS behavior - cast a ray forward to get the correct reflection angle, and then bounce the ball at that angle.

  • It looks related to this known issue with bullet behaviour bouncing:

    construct.net/en/forum/construct-3/how-do-i-8/fix-problem-collisions-126684

    There's a response here from Ashley in the bug report:

    github.com/Scirra/Construct-3-bugs/issues/622

  • Try to make the collision polygon as round as possible. If this doesn't help, you have two options:

    Pretty sure I tried experimenting with that but I'll do it again to check.

    1. use Physics with circle collision mask.

    I've tried this a while ago. I think it improved the way things bounced but I couldn't see any way to exclude collisions with objects of the same type so I couldn't stop the circles from colliding with each other making it unsuitable for this game.

    2. use raycasting feature of LOS behavior - cast a ray forward to get the correct reflection angle, and then bounce the ball at that angle.

    That sounds like it could be worth a try. I haven't used raycasting before so I'll look in to it.

    Thanks for the ideas!

  • It looks related to this known issue with bullet behaviour bouncing:

    https://www.construct.net/en/forum/construct-3/how-do-i-8/fix-problem-collisions-126684

    There's a response here from Ashley in the bug report:

    https://github.com/Scirra/Construct-3-bugs/issues/622

    Yes that's exactly it. As the OP there says this issue results in bullets often bouncing in directions wrong by 45 degrees which is pretty significant in a game about skilfully bouncing off things. I understand if it's too much trouble to address it in the bullet scripting so I guess the solution is to just find another way to do it instead.

    Thanks for the info.

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