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

2D Tile Collider, Composite & Platform Effector

Discussion in '2D' started by khold93, Feb 8, 2021.

  1. khold93

    khold93

    Joined:
    Feb 11, 2020
    Posts:
    17
    What I want:
    I'm trying to make my character jump & if he doesn't reach the top of the ground tile it should fall down again. Right now it stops falling at the bottom part of the ground tile if it didn't reach the top. (see video below)

    Tried to google and all the solutions I can find is about Platformer Effector 2D -> "Use One way" and "Use one way grouping"
    1. If I try with "Use One Way Grouping" only , the character doesn't go through the tile in any way.
    2. If I use both, it can go through but lands inside the box if it doesn't reach the top (see video below).

    Video Link

    Tilemap Components:



    Any ideas?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,513
    You're using Outline mode so there's no "inside" of these tiles, it's just an outline i.e. the same as an EdgeCollider2D so your tile "top" is the same as the "bottom". If you change this to closed shapes i.e. Polygon mode it'll persumably work.
     
    khold93 likes this.
  3. khold93

    khold93

    Joined:
    Feb 11, 2020
    Posts:
    17
    Simple & effective little detail. I appreciate that you explained it as well. Thank you :)
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,513
    khold93 likes this.