Search Unity

Ball won't bounce off walls correctly. (Sticks instead) [SOLVED]

Discussion in 'Editor & General Support' started by yahretzkee, Dec 29, 2016.

  1. yahretzkee

    yahretzkee

    Joined:
    Dec 6, 2016
    Posts:
    13
    I'm trying to get a simple physics game working that uses a ball. The ball needs to bounce off walls realistically. However, when the ball approaches any wall at a relatively small angle, it just sticks to the wall instead of bouncing off.

    Is there any possible way around this? When going head on at the wall, the ball will bounce. It will also bounce all the way up until around 20 degrees or so, depending on the velocity.

    I wanted to clarify this question a bit more. Here is a quick drawing of the problem:



    I need the case on the right to not happen anymore. If I had to guess, I'd say that the collision logic has a bug in it where it tells objects to not have any velocity other than parallel to the normal if it's going slow enough.
     
    EightBarGames likes this.
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,409
  3. yahretzkee

    yahretzkee

    Joined:
    Dec 6, 2016
    Posts:
    13
    Thank you! Case closed!
     
  4. Deleted User

    Deleted User

    Guest

    NiUral likes this.
  5. Ligmaphobia

    Ligmaphobia

    Joined:
    Mar 27, 2022
    Posts:
    9