Search Unity

Found a bug in unity2017.1

Discussion in 'Physics' started by XaenZx, Aug 15, 2017.

  1. XaenZx

    XaenZx

    Joined:
    Jun 18, 2017
    Posts:
    9
    Hi,

    Not sure if here is were i should report the bug. If you make a plane and a sphere with a rigidbody, at some specifics altitudes, the sphere goes trough the plane.

    To reproduce it easily, i put the sphere 3.5 units higher than the plane and change the sphere scale to (0.2 , 0.2 , 0.2).

    This also ocurs with other altitudes like 5.0, but no with 5.1 or 4.9.
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    This is the expected behavior because the collision detection is performed at discrete time steps. Thus, it may happen that at a given time t0 the sphere is at one side of the plane, and at the next time step t1 the sphere has moved entirely to the other side without having made any contact.

    Possible workarounds:
    • Decrease the Fixed Timestep (Edit > Project Settings > Time)
    • Enable Continuous Collision Detection (CCD) at the sphere's Rigidbody (Collision Detection --> Continuous or Continuous Dynamic). Note that this works only with basic colliders (sphere, box, capsule) but not with MeshColliders. You need to replace the plane with a scaled cube for CCD to work.
     
  3. XaenZx

    XaenZx

    Joined:
    Jun 18, 2017
    Posts:
    9
    I didn't knew. Sorry to post it as a bug :S

    Thank you for the really well explained answer :)
     
  4. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,510
    You're welcome! No need to apologize, we all have been beginners at some point :)