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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

How to make a platfrom traversable by the bottom

Discussion in '2D' started by Leandro95, Mar 21, 2015.

  1. Leandro95

    Leandro95

    Joined:
    Mar 18, 2015
    Posts:
    16
    Hi,

    I want to know how to make a platform traversable by the bottom like mario for example.
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,998
  3. Leandro95

    Leandro95

    Joined:
    Mar 18, 2015
    Posts:
    16
    thank but in unity 4 ?
     
  4. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    Seems like an odd question. I mean... how are you making the platforms traversable on their tops?

    If I was making a game where the player and / or enemies could walk around a platform I'd just track which way their feet are. If walking on the top of a platform their feet would be down so shooting a ray down would detect the top of the platform allowing them to walk across it. If they were on the bottom of a platform the character's feet would be up so shooting a ray up would detect the bottom of the platform allowing them to walk across it.
     
  5. Leandro95

    Leandro95

    Joined:
    Mar 18, 2015
    Posts:
    16
    i just create a zone which enable or disable collider of the platform
     
  6. GarBenjamin

    GarBenjamin

    Joined:
    Dec 26, 2013
    Posts:
    7,441
    What happens if you use that same approach for the bottom of the platform?
     
    theANMATOR2b likes this.