Bullet infinity bouncing

0 favourites
  • 3 posts
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • I'm trying to make an arcanoid game - ball hits bricks, they disappear, ball hits moving platform, etc.

    I'm using bullet bouncing off solids behavior for my ball. Platform and bricks are solid. Sometimes ball acts weird.

    First - when ball falls vertically (90 degrees) on platform it's difficult to change ball's angle. Sometimes it takes few hits for.

    Second - sometimes ball moves horizontally and start bouncing between walls infinitely with no chance to stop it.

    As I understand bounce angles are rounded somehow to simplify calculations, that's why ball often has perfect 90 or 180 degrees.

    I can make check and add one degree if ball has 90 or 180 degrees angle to prevent stucking. But probably somebody in community has more natural solutions? Maybe latest version of Construct 2 or even Construct 3 has better collisions? I'm not using latest version of Construct 2 because sometimes it crashes on my pc configuration.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could try:

    On collision bullet set angle of motion to angle of motion + random(-10,10)

  • You could try:

    On collision bullet set angle of motion to angle of motion + random(-10,10)

    That is what I'm doing right now, but 10 degress is too much I think. I'm adding less than 1 degree and that's seems working. However ball moving is still glitchy a bit.

    Btw I've tried physics based ball with immovebale objects, 0 gravity and circle collision. You won't believe, but ball can stuck and bounce infinitely between walls anyway.

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