how to HOLD JUMP KEY TO JUMP HIGHER - 2D PLATFORMER CONTROLLER - Easy Unity Tutorial

  Рет қаралды 13,460

Zacoriot

Zacoriot

Күн бұрын

Пікірлер: 42
@DevNoob
@DevNoob 3 жыл бұрын
Great! Normally I always had a fixed jump height so definitely saving this!
@LenexTL
@LenexTL 3 жыл бұрын
So, I got a small issue in which if I jump the character will stop moving for a second but then continue once in the air.
@LenexTL
@LenexTL 3 жыл бұрын
If I put the Jump Start Time value to something like 0.01 it does not do this, but it then only jumps normally, any idea on how to fix this?
@scrappyperson
@scrappyperson Жыл бұрын
I have the same issue. It's very strange. I also noticed in my case that if I set my max jump height to something very high, the player actually keeps moving, but just very very slowly.
@Kahier
@Kahier Жыл бұрын
thanks for this refined and fast tutorial. vey helpful
@korays0726
@korays0726 2 жыл бұрын
that was super helpful. thanks!
@cuvanvan
@cuvanvan 2 жыл бұрын
Useful video!
@afiyindev
@afiyindev 3 жыл бұрын
Hey Bro! Really great video which has taught me a lot about Unity, except one problem I've followed all your instructions all the way from your 2d platformer video and everything shows up exactly as it should in the Inspector except for the fact that I can move side to side but my character can't seem to jump (Jumping is actually all what I need) do you have any idea what I did wrong?
@zacoriot
@zacoriot 3 жыл бұрын
Have you assigned all the ground elements to the layer ground Have you assigned "what is ground to ground" Does groundcheckradius have a value Does your jumpForce have a value
@zacoriot
@zacoriot 3 жыл бұрын
Are you calling the jump method in your void update?
@afiyindev
@afiyindev 3 жыл бұрын
​@@zacoriot yes everything here I've done correctly but still not working unfortunately but thanks for the help anyways.
@zacoriot
@zacoriot 3 жыл бұрын
@@afiyindev In the description, I have a paste-bin link which leads to the code. feel free to copy and paste that and see if that helps :) sorry bud
@afiyindev
@afiyindev 3 жыл бұрын
@@zacoriot hey bro! haha not to worry, I was at fault here, your code was fine I was just pressing the pageUp button instead of the space bar, very silly mistake, but its fine now
@yes_sayer
@yes_sayer Жыл бұрын
how to make it so i can move side to side while in the air
@RedundantDan
@RedundantDan 7 ай бұрын
I'm a year late but maybe this will help the next person: On both lines where you set the "rb.velocity" value, change the code to "rb.velocity = new Vector2(rb.velocity.x , jumpForce);" This will leave your horizontal velocity untouched during a jump so you can control it however you want with your movement controls.
@4ndrito
@4ndrito Жыл бұрын
how do i add a double jump to your code
@dersupremists5007
@dersupremists5007 9 ай бұрын
I just got one for free
@johnsamuelquilario5671
@johnsamuelquilario5671 2 жыл бұрын
Hi!, can this be use in a 3D game?
@zacoriot
@zacoriot 2 жыл бұрын
Yes, you just need to adapt it for 3 dimentions (vector3)
@mrhekko9842
@mrhekko9842 3 жыл бұрын
thank yyou
@cuongnguyenhoangzk1
@cuongnguyenhoangzk1 2 жыл бұрын
thanks
@mnnm1989
@mnnm1989 2 жыл бұрын
Looks like a ripoff from blackthornprod's video on the same topic. Is this even the same code?
@Elliott280
@Elliott280 Жыл бұрын
exact same code
@Zero-bn4nc
@Zero-bn4nc 2 жыл бұрын
is not jumping i dont know why
@zacoriot
@zacoriot 2 жыл бұрын
Have you assigned the ground layermask to the grounds objects?
@sashabagdasarow497
@sashabagdasarow497 10 ай бұрын
Damn, I don't know what I'm doing wrong, but it doesn't work :( Here is my code: " private void JumpingMainHoldToJumpHigher() { if (currentPlatform != null && Input.GetKeyDown(KeyCode.Z)) { isJumping = true; jumpTime = jumpStartTime; ballForce.AddForce(Vector3.up * Time.deltaTime * jumpForce, ForceMode.Impulse); } if (Input.GetKey(KeyCode.Z) && isJumping == true) { if (jumpTime > 0) { ballForce.AddForce(Vector3.up * Time.deltaTime * jumpForce, ForceMode.Impulse); jumpTime -= Time.deltaTime; } else { isJumping = false; } } if (Input.GetKeyUp(KeyCode.Z)) { isJumping = false; } }"
Improve your Platformer’s Jump (and Wall Jump) | Unity
8:12
Dawnosaur
Рет қаралды 135 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
How to jump in Unity (with or without physics)
16:09
Game Dev Beginner
Рет қаралды 50 М.
How To Fail At Making A Platformer
2:40
Artindi
Рет қаралды 326 М.
How To Wall Slide & Wall Jump In Unity
6:38
bendux
Рет қаралды 80 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,3 МЛН
10 Unity Tips You (Probably) Didn't Know About
6:47
Sasquatch B Studios
Рет қаралды 50 М.
UNITY JUMP | Unity 2D Jump System
8:02
Rehope Games
Рет қаралды 68 М.
A Perfect Jump in Unity - A Complete Guide
17:05
Press Start
Рет қаралды 77 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН