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
  4. Dismiss Notice

Unity unable to make pixel precise 2D platformers? Need help.

Discussion in '2D' started by TimHellmann, Aug 4, 2013.

Thread Status:
Not open for further replies.
  1. TimHellmann

    TimHellmann

    Joined:
    Mar 6, 2011
    Posts:
    66
    Dear Unity members,

    first of all: Don't get me wrong. I love Unity for what it is, otherwise I would not work with it for two years now. However, it seems this engine is not suitable at all when it comes to 2D platformers, which need to have very precise collision detection and jumping. Super Mario World / Braid style. I tried everything. Character Controller, Rigidbody+Box Collider combos but none of those solutions brought me a satisfying result.

    http://golden-coin.bplaced.net/DotC.html

    Please have a look at this tiny prototype I worked on recently. For this one, I used a Character Controller with an additional Box collider at 0.9 dimensions on it - to try avoiding the famous "slip from edge" problem the Character Controller has when trying to jump at the very last pixel of an edge. Unfortunately, this did not help at all.
    I still have the famous issue of slipping off the edge because the CC already wants to believe it is in mid air and I do not know how to get rid of it without writing the detection from scratch. (Which is not my strength, to be honest)

    These are my Character Controller settings:
    $dotc_cc_settings.png

    Another issue I occured was jumping and falling through walls when REALLY having the Collider pixel-precise around my player's cube. This is why you cannot move inside the free parts of the "S" in the second dummy room, for example. If I make the collider as precise as walking through "As-high-as-player" passages, the dot randomly might fall or jump through the S.

    (Maybe it is important to mention I use Probuilder for the elements inside the outline borders)


    I tried every obvious solution the documentation and unityAnswers can offer. With and without Rigidbodies. With and without additional colliders and whatsoever. I even changed TimeManager to a 0.01 to try speeding up the detection. Nothing helped, nothing solved this problem which is a No-Go.

    Maybe someone of this wonderful community could help me with my issues. :D

    Sincerely,
    Aries
     
    Last edited: Aug 4, 2013
  2. gruddlebug

    gruddlebug

    Joined:
    Mar 11, 2013
    Posts:
    65
  3. TimHellmann

    TimHellmann

    Joined:
    Mar 6, 2011
    Posts:
    66
    Hold on. I rebuilt some parts without ProBuilder and noticed the triggers work better. So it seems Probuilder is the reason for the trigger issue or Unity is causing the trouble because of Probuilder. I already asked those guys for support.

    Anyway, the pixel perfect jumps and collision is still in question. :]
    Thanks gruddlebug. I will have a look at it but I don't know if this is what I am looking for.
     
    Last edited: Aug 4, 2013
  4. MyChild183

    MyChild183

    Joined:
    Nov 6, 2015
    Posts:
    1
    Did you ever find out why?
     
  5. Aurore

    Aurore

    Director of Real-Time Learning Unity Technologies

    Joined:
    Aug 1, 2012
    Posts:
    3,106
    Necro.
     
Thread Status:
Not open for further replies.