Search Unity

Character Controller & Tilemap Collider 2D

Discussion in 'Physics' started by rvenson, Jan 21, 2018.

  1. rvenson


    Feb 12, 2017
    Is there any issue about Tilemap do not work with Character Controller?

    I have a character controller in a scene and tilemap collider 2D simply do not work. My character stills interacting normally with box or other colliders.

    PS.: Kinematics body don't interact with Title colliders too
    Last edited: Jan 21, 2018
  2. thaller99


    Dec 7, 2018
    Same here, any news?
  3. MelvMay


    Unity Technologies

    May 24, 2013
    Can you please be more specific. What is "Character Controller"; your own script or some third party script? What do you mean by "issue"?

    Again, you need to be more specific on what you mean. I am assuming the TilemapCollider2D is static i.e. it's either not attached to a specific Rigidbody2D or attached to one set to be Kinematic/Static. Kinematic bodies never produce a collision response. Also, Kinematic bodies by default do not produce contacts. You can turn on contacts (but not collision response) by using this.

    I think you need to describe your problem more accurately because TilemapCollider2D are no different than any other collider, the underlying physics system knows nothing of these component types. A TilemapCollider2D produces the same polygon primitives that the PolygonCollider2D does.
  4. fredmeister77


    Sep 2, 2019
    This is an older question, but for anyone who came here from Google like I did, I couldn't get the "Character Controller" component to work with the Tilemap Collider 2d + Composite Collider 2d no matter how much I tried. The Character Controller is supposed to work with collisions, but no dice for me.

    I ended up just removing the Character Controller from my player object and adding a Rigid Body 2D component (with 0 gravity, and Z axis frozen) and a Box Collider 2D set to the right size. Worked like a charm.

    It was based off of this video: