Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Feature Request Tile's Collider shape

Discussion in '2D Experimental Preview' started by bartuq, Apr 19, 2019.

  1. bartuq

    bartuq

    Joined:
    Sep 26, 2016
    Posts:
    95
    Hi,
    Please consider an option to set Collider shape on the Tile Palette/Individual tiles. I know we already have Collider Type: None, Sprite, Grid, but it's not enough for some projects, especially 2D Isometric.

    What I mean:
    For example in Godot Engine "you can add collision shapes to individual tiles and the entire map will act as a single collider, simplifying your collision code". Other things can also be done a lot easier.

    4:20 LINK
     
  2. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    541
    This is broken up into a bunch of different features here:

    Setting a custom Physics Shape for a Sprite (or the Sprite/s used in a Tile):
    https://docs.unity3d.com/2019.1/Documentation/Manual/CustomPhysicsShape.html
    Normal Sprites rendered using a SpriteRenderer with a PolygonCollider2D can benefit from this. Tiles with the Collider Type: Sprite will use this shape.

    Combining Collider2D/s into a single Collider2D can be done with the CompositeCollider2D:
    https://docs.unity3d.com/2019.1/Documentation/Manual/class-CompositeCollider2D.html
    You can add a CompositeCollider2D in a parent GameObject or with the Collider2D GameObject (or TilemapCollider2D) and toggle the "Used By Composite" property to combine the Collider2D/s.
     
unityunity