Bouncing ball, angle problem

This forum is currently in read-only mode.
From the Asset Store
Bouncing ball
$9.99 USD
Template for a bouncing ball game, fully documented in comments and video
  • Anyone ever made a basic breakout type game.

    4 walls, 1 paddle, and a ball with ball behaviour.

    Sometimes the ball can get stuck in a sort of side to side loop as shown in the pic.

    Could somebody tell me how to stop this happening ?

    <img src="http://dl.dropbox.com/u/22173473/breakout.png" border="0" />

    These are my settings for the ball:

    Randomness          20

    Bounce friction    off

    Rotate object       off

    Bounc off solids yes

    Rotation              N angles

    Rotation count     8

    I did a search, but the links to the example files dont work.

  • Maybe add a random value to the ball.y when the ball.y before impact is the same after impact with a wall, if you get my drift.

    I seem to remember such games as Arkanoid would sometimes do the same but would then veer off after a certain number of bounces.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe add a random value to the ball.y when the ball.y before impact is the same after impact with a wall, if you get my drift.

    I seem to remember such games as Arkanoid would sometimes do the same but would then veer off after a certain number of bounces.

    Good idea...I just added the following and it works ok:

    + ball5: On collision between ball5 and wall

    + ball5: Angle Less than 14

    + ball5: Angle Greater than 346

       -> ball5: Set angle to ball5.Angle-20

    + ball5: On collision between ball5 and wall

    + ball5: Angle Less than 194

    + ball5: Angle Greater than 166

    -> ball5: Set angle to ball5.Angle-20

    Thanks zenox98

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