Great! Normally I always had a fixed jump height so definitely saving this!
@LenexTL3 жыл бұрын
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.
@LenexTL3 жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
thanks for this refined and fast tutorial. vey helpful
@korays07262 жыл бұрын
that was super helpful. thanks!
@cuvanvan2 жыл бұрын
Useful video!
@afiyindev3 жыл бұрын
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?
@zacoriot3 жыл бұрын
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
@zacoriot3 жыл бұрын
Are you calling the jump method in your void update?
@afiyindev3 жыл бұрын
@@zacoriot yes everything here I've done correctly but still not working unfortunately but thanks for the help anyways.
@zacoriot3 жыл бұрын
@@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
@afiyindev3 жыл бұрын
@@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 Жыл бұрын
how to make it so i can move side to side while in the air
@RedundantDan7 ай бұрын
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 Жыл бұрын
how do i add a double jump to your code
@dersupremists50079 ай бұрын
I just got one for free
@johnsamuelquilario56712 жыл бұрын
Hi!, can this be use in a 3D game?
@zacoriot2 жыл бұрын
Yes, you just need to adapt it for 3 dimentions (vector3)
@mrhekko98423 жыл бұрын
thank yyou
@cuongnguyenhoangzk12 жыл бұрын
thanks
@mnnm19892 жыл бұрын
Looks like a ripoff from blackthornprod's video on the same topic. Is this even the same code?
@Elliott280 Жыл бұрын
exact same code
@Zero-bn4nc2 жыл бұрын
is not jumping i dont know why
@zacoriot2 жыл бұрын
Have you assigned the ground layermask to the grounds objects?
@sashabagdasarow49710 ай бұрын
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; } }"