Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Weird Collider Glitch

Discussion in '2D' started by MCBearPlays, Apr 27, 2021.

  1. MCBearPlays

    MCBearPlays

    Joined:
    May 27, 2020
    Posts:
    2
    Does anyone know how to fix this? It glitches out whenever two colliders press up against eachother

     
  2. TheNightglow

    TheNightglow

    Joined:
    Oct 1, 2018
    Posts:
    201
    are you moving your player with transform.position instead of rigidBody2D.AddForce?

    transform.position ignores colliders, if you move something with that it will just teleport disregarding any colliders
    if you teleport something inside a collider, unity will try to autoresolve the collider conflict by pushing the object back out
     
    KalOBrien and MCBearPlays like this.
  3. MCBearPlays

    MCBearPlays

    Joined:
    May 27, 2020
    Posts:
    2
    That worked. THX!