Search Unity

Creating a Basic Platformer Game (Outdated?)

Discussion in 'Community Learning & Teaching' started by Clock_Codes, Nov 13, 2017.

  1. Clock_Codes

    Clock_Codes

    Joined:
    Oct 3, 2017
    Posts:
    1
    Hello so I'm pretty new to Unity and I've been tooling around with the personal version. I did the roller ball tutorial, it was good stuff. But my interest is more in 2D games so I found this tutorial

    https://unity3d.com/learn/tutorials/topics/2d-game-creation/creating-basic-platformer-game

    However after ~18 minutes when I test the Simple Platform Controller we built, everything goes haywire. I spent a few hours working through some of the problems but I even copy + pasted their code over mine and I just can't get it to work.

    1) Player was completely unaffected by gravity. I could move left and right but it just floated in the starting position. I fixed this by turning off Apply Root Motion.

    2) Now the player hit the ground when I hit start, but when I moved the entire ground would tilt back and forth. Fixed by changing its Animator's Update Mode from "Animate Physics" to "Normal". Voila now the player hits the ground and it acts like ground.

    3) But the player continually slides along the ground after I end input. So I did some google fu and it looks like RigidBody.MovePosition is what I should be using instead of what the tutorial says (I've yet to implement this).

    4) Also I cannot jump at all.

    5) Also also half the potato man's limbs disappear when I move (the backside ones, his left foot and hand).

    X) completely unrelated but I couldn't post this as a question on answers (idk if that would have been better than here) as it just takes me to my profile.

    I did find a separate 2D platformer tutorial while searching for a Q&A to the one I'm currently using. Should I just scrap what I have and use this?

    https://forum.unity.com/threads/creating-a-2d-platformer-controller.316404/
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    I think you should progress with what you have, and deal with the issues you encounter. To be honest you are learning a good deal and all that information is gold for when you start to work on your 'actual' first game. Right now this is all learning and is invaluable to progressing.
    Also - once you've got a grasp of what is going on with movement, and why changing stuff effects the characters and certain interactions in the game, it won't hurt to move onto another 2d platformer. These are aplenty on the internet, and each one does things slightly different, which is great for learning and understanding the 'why' not just the 'how'.

    ;)