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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Rule Tile Collision detection

Discussion in '2D' started by Dev_UHG, Jun 13, 2020.

  1. Dev_UHG

    Dev_UHG

    Joined:
    Jun 5, 2017
    Posts:
    21
    hi I have a rule tile.

    When set
    Output = "Single" this one creates collisions detected by the corresponding script attached to the tilemap.

    When changed to
    Output = "Animated" (even with only 1 Tile) the script does not register any collsion anymore.


    private void OnTriggerEnter2D(Collider2D other)
    {
    Debug.Log("Tilemap Collision triggered by :" + other.name);



    Ruletile.JPG
     
  2. Dev_UHG

    Dev_UHG

    Joined:
    Jun 5, 2017
    Posts:
    21
    I am using Unity 2019.3.6f1.
    Thanks for any input. I googled the last 2 days but did not find anything.
     
  3. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,323
    Does it work with ColliderType.Grid? It makes some sense to me that it might be limited to that to avoid animated objects constantly updating their shapes which would add a lot of physics cost. I'm not sure about that.

    Another potential issue is that with ColliderType.Sprite you also need to define a Custom Physics Shape within the Sprite Editor menu. You might be lacking that.
     
  4. Dev_UHG

    Dev_UHG

    Joined:
    Jun 5, 2017
    Posts:
    21
    Hello Lo-renzo, thanks for the reply. Grid does not work either. Yes Physics Shape is defined.
     
  5. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    @BertTheNerd Could you share your project by filing a bug using the Unity Bug Reporter and posting the case number here? Thanks!
     
    Dev_UHG likes this.
  6. Dev_UHG

    Dev_UHG

    Joined:
    Jun 5, 2017
    Posts:
    21
    Hi ChuanXin. thanks I will prepare this and will look into the bug reporter (have not done that before).When done I will post the case number. Cheers
     
  7. Dev_UHG

    Dev_UHG

    Joined:
    Jun 5, 2017
    Posts:
    21
    hello ChuanXin,
    (Case 1257581) Collision of animated rule tile not detected
    thanks
     
  8. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    Thanks, we'll check it out!
     
  9. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    Hi, this looks like a bug. This has been fixed in Unity 2020.1, but we will see if the fix can be brought to 2019.4. Thanks for reporting this!
     
  10. Dev_UHG

    Dev_UHG

    Joined:
    Jun 5, 2017
    Posts:
    21
    thanks!