Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Inaccurate Collisions?

Discussion in 'Physics' started by unity_W8RqHkclGRdmbw, Sep 19, 2018.

  1. unity_W8RqHkclGRdmbw

    unity_W8RqHkclGRdmbw

    Joined:
    Mar 3, 2018
    Posts:
    2
    Sorry in advance if this is a stupid question, I don't know how the underlying mechanics work.

    Today I have come across the following problem: I have a 2d circle that has no gravity, no friction and no bounce. I set it's rigidbody's velocity to (3,0). Beneath the circle is a set of blocks with box colliders, it is NOT inside them. This is the setup:

    01_ball aligned.PNG

    For good measure I have moved the circle up by 0.005 units. What I expect is that the circle moves to the right and it does so without changing it's y position (-0.745 being the inital y position). In the following picture it has already traveled almost one unit on x.

    03_inb4bounce.PNG

    But in the next frame, two blocks connect (seamlessly in theory). That's where the jump happens.

    04_bounce.PNG

    Here is the problem summed up in one picture

    05_expectation vs reality.PNG

    What's going on? It isn't making contact with the surface and even if it was, there is no friction. Even then, it doesn't exert a force on the ground since there is no gravity. The cubes aren't randomly pushing upwards, it only happens at the seams.


    Thanks for your help


    Edit: I am using Unity 2018.2.8f1
     
    Last edited: Sep 19, 2018
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,753
    Not sure if that will help, but check Physics Manager in Edit -> Project Settings -> Physics
    There you have contact offset. See if that affects behavior.
    upload_2018-9-20_16-36-31.png
     
    unity_W8RqHkclGRdmbw likes this.
  3. unity_W8RqHkclGRdmbw

    unity_W8RqHkclGRdmbw

    Joined:
    Mar 3, 2018
    Posts:
    2
    That seems to have solved my problem. Thanks!