Stop the Double Bounce

The wall bounce works, and the method behind it is one line long. That line flips the vertical part of the direction every time it runs. That is right when the ball enters a wall, and wrong at every other moment. This node puts a guard around the flip.

More in Make the Ball Move

  1. Understand Colliders
  2. Add a Kinematic Rigidbody
    1. Why Not Use Physics
  3. See What the Ball Touched
    1. Write Your Own Method
  4. Bounce Off the Walls
    1. Stop the Double Bounce

All 54 topics in the Your First Unity Game