2D DOUBLE / TRIPLE JUMP PLATFORMER CONTROLLER - EASY UNITY TUTORIAL
Why Stack Overflow recommends it
Stack Overflow users cite it as the tutorial they followed when writing 2D player movement and jumping code, and they link it when asking for help debugging that code.
Recommended by 2 people across 2 different months, 2019 to 2022.
What it is
A Unity and C# tutorial from Blackthornprod that walks through building a 2D platformer character controller, including ground detection and double, triple and higher multi-jump logic. It is aimed at beginners making a first platformer.
What people said
Recommends Aaron Record · 2020-04 · Stack Overflow · on “Are My Unity 2D Transform.Position Units Changing Between Builds?”
Try multiplying your movement by Time.deltaTime . If you don't do this (which it doesn't look like you are), then all your GameObjects will move at inconsistent speeds. The reason for this is that void Update() get's called once every frame, and the amount of frames that get drawn every second is variable (sometimes your game will run a little faster than at other times), and so your speed will be variable if you don't multiply it by Time.deltaTime (Time.deltaTime is the amount of time that has passed since the last frame, see the documentation [LINK] ) Another option is to use Unity's built in physics system with FixedUpdate(), which get's called at a fixed rate. I would strongly recommend
Recommends victor sirbu · 2022-08 · Stack Overflow · on “Why it says expected ',' but i don't see why to use it”
I tried to make this tutorial: [this video] , on player movement 2d and i get this errors: Assets\PlayerController.cs(51,37): error CS1001: Identifier expected Assets\PlayerController.cs(51,37): error CS1003: Syntax error, ',' expected Assets\PlayerController.cs(54,44): error CS1001: Identifier expected Assets\PlayerController.cs(54,44): error CS1003: Syntax error, ',' expected using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { public float speed; public float jumpForce; private float moveInput; private Rigidbody2D rb; private bool facingRight = true; private bool isGrounded; public Transform groundCheck; public float che
Cites Somebody · 2019-02 · Stack Overflow · on “Question about Double Jump and Collision in Unity”
I have just started to learn how to make a simple 2D platformer game in Unity, and I have watched Blackthornprod 2D Platformer movement video [this video] to learn how to make a character move and jump. So far I was able to understand most of the video, however, I have met some problem with the Jumping part. Now, as far as I understand in his video, to make a character jump, I need to detect whether the character is touching the ground or not. To do that I need to create a little circle under the player's feet to see if it overlaps the ground, like this [LINK] So, here is the code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoB