9. Unity 5 tutorial for beginners: 2D Platformer - Jumping

inScope Studios · 111K views · 2015 · 18:21

Open on YouTube

Game programming & enginesIndie game developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when they are following this series and need to show the exact jumping and ground-check approach they copied, usually while debugging a character that won't jump.

Recommended by 2 people across 2 different months, 2017 to 2020.

What it is

Episode 9 of an inScope Studios beginner series on building a 2D platformer in Unity 5 with C#. It covers implementing jumping for the player, including ground checking. The presenter walks through the code and setup step by step.

What people said

Recommends LocalNerd · 2017-10 · Stack Overflow · on “ContactFilter2d Layermask - For Ground Check”

Little detail: Hey guys! I don't have my computer infront of me as im at work. I'm actually watching videos on stuff to do when I get home so I will pull code the best I can. When it comes to creating a jump on a platform character, in most cases what I have seen is an object attached to the bottom of the character, and then a ground check is created to see if that object is hitting something. The tutorial I was following has way to many different components to check for. ( [this video] )| exact moment for code. Actual issue: So I've been trying to come up with my own way that seemed more simple, but I am stuck. So I figure, I want to say that if the collider on this player touches ANY other coll

Recommends Zachary Vickers · 2018-02 · Stack Overflow · on “I am having problems getting my player to jump in Unity”

I am currently creating my final project for my coding class, and I have run into a snag in figuring out how to jump. I have used a tutorial video series as reference to my project, here is the link to the jumping episode. [this video] I most likely have a logic error somewhere but every thing looks fine. Heres my code: private Rigidbody2D myRigidbody; [SerializeField] private float speed; [SerializeField] private Transform[] GroundPoints; [SerializeField] private float groundRadius; [SerializeField] private LayerMask WhatIsGround; private bool isGrounded; private bool Jump; [SerializeField] private float JumpForce; // Use this for initialization void Start () { myRigidbody = GetComponent<Rigidbo

Cites DTWaffleKing · 2020-05 · Stack Overflow · on “I'm trying to make my 2D unity character jump”

So as I said, I'm trying to make my character jump in Unity, but nothing is happening when I hit space, and Unity isn't throwing any errors. public class Player : MonoBehaviour { private Rigidbody2D myRigidbody; [SerializeField] public float jumpSpeed; private Animator myAnimator; [SerializeField] private float movementSpeed; private bool facingLeft; [SerializeField] private Transform[] groundPoints; [SerializeField] private float groundRadius; [SerializeField] private LayerMask whatIsGround; private bool isGrounded; private bool jump; [SerializeField] private float jumpForce; // Start is called before the first frame update void Start() { facingLeft = true; myRigidbody = GetComponent<Rigidb