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

[Solved] Object goes through Composite Tilemap Collider 2D (but doesn't when decomposited)

Discussion in '2D' started by dimenerno_unity, Mar 7, 2020.

Thread Status:
Not open for further replies.
  1. dimenerno_unity

    dimenerno_unity

    Joined:
    Nov 4, 2019
    Posts:
    2
    As the title says, a RigidBody object goes through a composite tilemap collider 2D. This doesn't happen when I decompose the colliders (i.e. disable the "Used by Component" option in the Tilemap Collider 2D settings). Also the object doesn't just go straight through the collider but pauses for a moment at the collider, and then passes through. I tried changing collision mode to Continuous but it didn't work. Does anyone have a solution for this? Thank you.
     
  2. dimenerno_unity

    dimenerno_unity

    Joined:
    Nov 4, 2019
    Posts:
    2
    After a few more tries, I fixed it myself. Setting the Geometry Type of Composite Collider 2D fixed the issue. Leaving the thread for other people having similar issues to see.
     
    DrVanillaCookie likes this.
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,529
    The composite isn't special and the physics system does't know anything about it. You don't provide details (not important ones) so a guess is that you're using Outline (edges) which if you didn't know is the same as the edge collider i.e. primitive edges to the physics system.

    If you're using continuous col-det mode and you still went through then you must be moving the object via the Transform or some other method because continous col-det mode is solid and it's pretty hard to penetrate things, even edges.
     
    szokemarton94 and PoRtCuLLiS like this.
  4. wlancheritos

    wlancheritos

    Joined:
    Apr 16, 2020
    Posts:
    1
    Buenas noches, estoy trabajando con Tilemap Collider 2D pero no he logrado que no atraviese los muros, cambie las configuraciones sin obtener solución, les agradezco cualquier ayuda sobre el tema
    upload_2020-6-10_21-52-26.png
    upload_2020-6-10_21-53-33.png
    upload_2020-6-10_21-54-38.png
     
    TZ27 likes this.
  5. pleasurehouse

    pleasurehouse

    Joined:
    Oct 15, 2020
    Posts:
    96
    Mejor que preguntes en Inglés... obtendrás mas respuestas!! A mi me pasa lo mismo de vez en cuando... solo ocurre en las esquinas... cambiar la "geometría a polígonos" ayuda mucho aunque no soluciona el problema del todo... hasta que se encuentre una solución procura mantenerte alejado de las esquinas!!
    Saludos!!
     
Thread Status:
Not open for further replies.