A Perfect Jump in Unity - A Complete Guide

  Рет қаралды 77,226

Press Start

Press Start

Күн бұрын

Пікірлер: 175
@Kyle-if5gd
@Kyle-if5gd 5 жыл бұрын
This series is the best unity tutorials I've ever seen
@pressstart6864
@pressstart6864 5 жыл бұрын
Appreciate the feedback
@maestrogeicho
@maestrogeicho 3 жыл бұрын
This is one of the best tutorial series for unity I've ever seen.
@dr.zitrone312
@dr.zitrone312 2 жыл бұрын
I think i never subscribed after just one video. But halfway through the video you convinced me. 10/10.
@vonvetur
@vonvetur 4 жыл бұрын
I had some issues with jumping so I started to look at random jumping tutorials, and basically all I needed was to reset the y velocity to 0 on jump. Thank you for that.
@n1k000z
@n1k000z 3 жыл бұрын
yea but can anyone tell me why did he do that i mean we never applied any kind of y velocity before did we?
@donglesband
@donglesband 2 жыл бұрын
@@n1k000z It's so you always get the same velocity no matter how fast you spam the jump button. It can cause inaccurate physics predictions like the jump being executed twice, making you jump extra high sometimes.
@smartandfunny6140
@smartandfunny6140 5 жыл бұрын
How can you not subscribe to this Channel? Great Tutorial as always!
@pressstart6864
@pressstart6864 5 жыл бұрын
Thanks! Very smart of you ;)
@chino1moreno
@chino1moreno 3 жыл бұрын
Thanks so much dudeeee! One of the best tutorails ive seen, cant wait to watch more
@marhola100
@marhola100 4 жыл бұрын
This is the first jump tutorial that has worked for me. Thank you!
@konarkpahuja5047
@konarkpahuja5047 3 жыл бұрын
these tutorials are a godsend. did you/he ever make the wall jump tutorial?
@Matdif
@Matdif 2 жыл бұрын
When you add drag to a rigid body this effects both dimensions in Unity2D. As in rb.drag is altering our jump height. If you stay still (x direction) while jumping your jump is dampened. When you are moving while jumping it is not so the jump is higher. I changed the application of rb.drag to call a method instead. private void ApplyHorizontalDrag() { rb.velocity = new Vector2(rb.velocity.x * Mathf.Clamp01(1 - dragConstant), rb.velocity.y); } This applies the drag only in the x direction leaving the jump unchanged. I replaced the rb.drag = linearDrag with a call for this method in fixed update. The else part of the statement is not needed since this is applied each time and does not change the drag and therefore does not need to be changed back. I used dragConstant = .9f so far but lowering it gives you a softer stop when turning and such.
@zacharyheesaker5295
@zacharyheesaker5295 2 жыл бұрын
This is such a great tutorial on character control! Thank you!
@rachitvasudeva7538
@rachitvasudeva7538 3 жыл бұрын
Probably the best jump guide ever💯
@LowPolyOne
@LowPolyOne 5 жыл бұрын
Thank you a lot, my dude! It's a very informative and useful tutorial. My respects to you!
@JackieCodes
@JackieCodes 3 жыл бұрын
really great tutorial, quality content 🤙
@Take22952
@Take22952 2 жыл бұрын
Honestly, I love watching unity game devs making devlogs and tutorials so much, even though I don’t use Unity.
@LukSilva12
@LukSilva12 2 жыл бұрын
God, you're really teaching us how to do things profissionally. Really liked your videos and the way you teach. Became sad when I saw the last video you uploaded was 2 years ago. You haven't even finished this 4 parts tutorial ;(. Where are you?
@maxrdev703
@maxrdev703 2 жыл бұрын
Wow, I haven't even finished the video yet but this is amazing. You explain everything perfectly and lay out the videos perfect for beginners. You deserve so much recognition, keep up the amazing work.
@sync3471
@sync3471 3 жыл бұрын
Thanks for giving me a Jump Start
@JorgeVerdu
@JorgeVerdu 4 жыл бұрын
subscribed! Can't wait for the wall jump one :D
@KING-vy5ky
@KING-vy5ky 3 жыл бұрын
Are you still waiting?
@JorgeVerdu
@JorgeVerdu 3 жыл бұрын
@@KING-vy5ky For sure I am!
@jluis220690
@jluis220690 4 жыл бұрын
Amazing bro the best jump tutorial, watching from mexico
@Ярик-с8н
@Ярик-с8н 4 жыл бұрын
Thank you very much bro you have helped me a lot, people like you should be more !! I thank you from the bottom of my heart!!!
@TheNjyon
@TheNjyon 5 жыл бұрын
This kind of ground detection works fine for fast and easy prototypes. The problem with this one is obviously when u stand on an edge u will be in the falling state without falling. Sure u can add 2 more RayCasts to be safe for the most parts but if you want it 100% accurate u should sweep ur component. Unity provides u with a Box, Speher, Capsul ... Casts. That should work great for "most" cases
@BobrLovr
@BobrLovr 4 жыл бұрын
lol, or you can literally just add two more raycasts, one for each edge of your player. It's not that hard
@studioprimitive
@studioprimitive 4 жыл бұрын
This helped greatly with my character's jump. Thanks!
@DecrareOld
@DecrareOld 5 жыл бұрын
I subscribed to you today. you can explain everyrhing i need really good
@VEOdev
@VEOdev 2 жыл бұрын
For the ground check it is better to use a sphere cast and not a line cast Also for the short jump you can just put Y velocity to 0 when you release the jump button so the character will fall down as soon as you let the key
@ggiillii2813
@ggiillii2813 3 жыл бұрын
Help My falling animation only plays when I hold the down key or "S" and only stops when I press the up key or "W".
@WakeTheShark446
@WakeTheShark446 3 жыл бұрын
Great video! One issue I've encountered however is that on impact to the ground, the character dips into the ground ever so slightly before popping back out and interrupts the player's velocity. I'm currently using a box collider for my character but also tried an edge collider like how you have it on yours to an even worse effect. Is there a fix to this?
@andrew_ceco
@andrew_ceco 3 жыл бұрын
Hey friend, I'm probably too late to be totally helpful HOWEVER... I've found that the player is going to dip into the ground no matter what, but going to your RigidBody 2d settings and changing your Collision Detection to continuous should help with it to some degree
@pagoda_dimensionale9761
@pagoda_dimensionale9761 3 жыл бұрын
same, have you discover the problem?
@private3946
@private3946 2 жыл бұрын
Set your Collission Detection to Continuous or try setting interpolate on extrapolate/interpolate in your Rigidbody2D settings
@SageNode
@SageNode 4 жыл бұрын
the Jump Delay you put in, is that basically coyote time?
@cools7uff
@cools7uff 3 жыл бұрын
How do I fix the hang time before the character falls after holding space
@karacter3369
@karacter3369 Жыл бұрын
for some reason the character slows down when hitting the floor, almost stopping, i wanted it to keep it's previous velocity...
@Zayther
@Zayther 5 жыл бұрын
What happened to the wall jump tutorial? Your channel is amazing so underrated
@bungercolumbus
@bungercolumbus 5 жыл бұрын
in production
@Zayther
@Zayther 4 жыл бұрын
@@bungercolumbus Wait how do you know? He hasn't posted in a long time ;(
@AITakesYourJob
@AITakesYourJob 3 жыл бұрын
still in production? :D
@sav-ke4sf
@sav-ke4sf 5 жыл бұрын
best tutorial, thx
@pressstart6864
@pressstart6864 5 жыл бұрын
Thank you
@danielgarcia-je9lc
@danielgarcia-je9lc 3 жыл бұрын
Great job!
@hatoving
@hatoving 5 жыл бұрын
The jumping works fine for me, but when the player reaches the ground, the gravity scale snaps from 5 to 0 quicky, where it stops the player for a millisecond and then walks normally. Any fix to this?
@victorlecam1813
@victorlecam1813 5 жыл бұрын
Same problem here. Someone ?
@uba754
@uba754 5 жыл бұрын
Same problem too, went back to double check everything and seems identical.
@McCooler
@McCooler 5 жыл бұрын
I've solved this adding a material with no friction to my player collider... don't know if this is the correct aproach
@seighart90
@seighart90 3 жыл бұрын
one thing i notice that using this code, if you have a running start you'll jump much higher than from a standing start because the force is stacked. This could be a cool feature if that's what you intended
@uba754
@uba754 5 жыл бұрын
My code and scene is identical but my character very briefly pauses when they hit the ground after a jump. Any idea why? Would love to fix this. Fantastic tutorial though really!
@SageNode
@SageNode 4 жыл бұрын
would also like a solution for this
@uba754
@uba754 4 жыл бұрын
@@SageNode Many of us in the comments have been using a physics material 2d to kind of fix this. I don't think it is perfect but its the best solution so far. Add the material to the ground plane with friction set to 0.01 and bounciness at 0. Have also read something similar but with the material on the player but I haven't tested it yet.
@SageNode
@SageNode 4 жыл бұрын
@@uba754 works like a charm. thanks
@marksimpson4310
@marksimpson4310 4 жыл бұрын
Great tutorials. I would love to know when you'll release a wall jump tutorial.
@Charles-Darwin
@Charles-Darwin 4 жыл бұрын
Couldn't you do another raycast horizontally and have it interact with a wall layer.
@Prox_C
@Prox_C 4 жыл бұрын
@@Charles-Darwin Pretty much this. Halt velocity and have a bool for IsWallJumping. limits inputs to what you want while latched on and set a new animation frame to show collision with wall surface. add impulse at an angle something like 60deg away from wall when jump is pressed and you're done. fixed wall hold vs sliding down would be design choices but the slide down wall can be achieved with a low gravity multiplier. Finish up by wrapping the input in a countdown that drops the character if no 'jump' input is made in time, resulting in the character letting go of the wall. Hope this helps anyone who comes across it.
@Charlie59876
@Charlie59876 3 жыл бұрын
Does anyone know why my player slows down when i jump?
@TheWgaffa
@TheWgaffa 4 жыл бұрын
Not sure what I'm missing but when my character lands it gets "stuck" for a short moment when landing. But your character seems to go at the same speed after landing.
@kamiieel
@kamiieel 3 жыл бұрын
i have the same problem i dont know what makes it do that
@bambonats2250
@bambonats2250 3 жыл бұрын
You could try setting the "Collision Detection" of your character's Rigidbody2D (I assume you are also making a 2D game) to Continuous. This stopped that weird "sinking in" thing when you land. Hope this works out for you too
@TheWgaffa
@TheWgaffa 3 жыл бұрын
Thanks, I got it to work and it indeed seemed to be Collision Detection needed to be set to Continuous
@smokinglife8980
@smokinglife8980 2 жыл бұрын
Also if you don’t want to be limited to certain layers to walk on just don’t use a layermask or have a layermask helper script that gets all the lays except what you specify
@mouradeid5457
@mouradeid5457 4 жыл бұрын
So I copied the script, I noticed that when I move horizontally then jump the character jumps higher than when it jumps while standing still, I tried several methods like clamping y velocity, using a targeted height and stop and it and others, none of them gave me that elegant result, any idea how can I fix this?
@efn5520
@efn5520 4 жыл бұрын
Someone said If(rb.velocity.x > 5) { Whatever you want } But I don't know if it works because i don't know what to write in Whatever I want
@Yamam100
@Yamam100 4 жыл бұрын
great tutorials
@SageNode
@SageNode 4 жыл бұрын
a problem with your set up is that vertical is only detected to activate the falling animation when you press down the S key. but why would the player be holding down the S key just so we can see the animation play. The fall animation should play when you are falling without having to hold down the S key.
@ΔΑΝΙΑΝΟΣΑΠΑΤΑΓΓΕΛΟΣ
@ΔΑΝΙΑΝΟΣΑΠΑΤΑΓΓΕΛΟΣ 2 жыл бұрын
I have a problem when i jump left or right, i get drag/magnetized to the closest wall how i can fix this?
@chaseums0967
@chaseums0967 2 жыл бұрын
"This next part might be a little overwhelming, so I'll explain it slowly." *proceeds to blast through the entire rest of the video* Regardless, very informative and you do explain what you're doing. Maybe just too much all at once for my brain to handle, LOL. It's a me-problem.
@林厚廷
@林厚廷 4 жыл бұрын
I have a question, set the collision detection to continuous is a good way or not, I know that this setting may use more resources.
@jacksonisaac9686
@jacksonisaac9686 4 жыл бұрын
What about for 3d?
@fettigerburger9258
@fettigerburger9258 4 жыл бұрын
When I just run my player stops moving randomly, and I have to move in the other direction to move again
@andrew_ceco
@andrew_ceco 3 жыл бұрын
Hey, I'm probably waaaay late for this, but you're getting stuck on tile colliders. The best solution for me was: 1. Create a new Physics Material with Friction set to zero 2. Attach to the Edge Collider 2D If this STILL isn't working, then: 3. Go to your RigidBody 2D settings 4. Change Collision Detection to Continuous As a note, other people have suggested adding a Composite Collider to your tilemap / ground layer, but that solution didn't work for me for some reason haha Hopefully all this info helps you, or some stranger in the future :)
@nightstech7499
@nightstech7499 3 жыл бұрын
OMG you are a life saver thanks alot :)
@СергейКоваленко-п2я
@СергейКоваленко-п2я Жыл бұрын
I want to see as a following to this useful video how you cope with the issue of the slope when the player slides down when staying at the slope and when the player is jumping at the slope when going up and down. This is a very common problem I think, but it`s hard to find good information about it.
@ruijiang6274
@ruijiang6274 4 жыл бұрын
Is there any difference between using two Raycast and using a single Boxcast?
@danieljayne8623
@danieljayne8623 4 жыл бұрын
"Start Quarantine" - TRIGGERED :D
@hunterc4881
@hunterc4881 3 жыл бұрын
That's "coroutine."
@victorlecam1813
@victorlecam1813 5 жыл бұрын
Hello everyone ! does anyone knows why my character loses X velocity when landing ? Except from this problem, it all works pretty good. Thank you for the videos !
@uba754
@uba754 5 жыл бұрын
Having the exact same problem I think. As soon as the character lands after a jump they pause for a brief second before continuing to move.
@torbrandt5546
@torbrandt5546 5 жыл бұрын
I had the same problem, and fixed it by applying a Physics Material 2D to my ground object with a Friction of 0.01 and Bounciness of 0.
@uba754
@uba754 5 жыл бұрын
@@torbrandt5546 It seems to have helped a great deal. Hard to say if it is 100% fixed for me but definitely better!
@torbrandt5546
@torbrandt5546 5 жыл бұрын
​@@uba754 Nice! But yeah the physics can be really confusing, and sometimes it's hard to know where to look for a solution, or even tell what the problem is exactly.
@HoisinDuckWrap
@HoisinDuckWrap 3 жыл бұрын
i copied the code from the description and got error Parameter 'onGround' does not exist. UnityEngine.Animator:SetBool (string,bool) leshen.PlayerController:Update () (at Assets/_Scripts/PlayerController.cs:51)
@jestarok
@jestarok 4 жыл бұрын
did he ever publish part 4 of this tutorial
@SageNode
@SageNode 4 жыл бұрын
I like having the squish feature on my jump, but i also want my actual jump animation to play as well, how do I get that to work with this squeeze
@HenriqueAzevedoarts
@HenriqueAzevedoarts 3 жыл бұрын
could you share the project?
@BoltGoesPro
@BoltGoesPro 3 жыл бұрын
Hey I have a question, so when you hold left or right, it makes you go higher when you jump, why is that? Edit: I figured out why, Am looking for a fix, it's because when you are holding down another button along with jump it acts like it cancels it out?
@vstechvideos9373
@vstechvideos9373 4 жыл бұрын
Just a quick doubt, why not use an Empty GameObject with a box collider2D at the bottom of the character to check if the character isGrounded? Raycasting is Wayyy Complicated.
@BobrLovr
@BobrLovr 4 жыл бұрын
hows it complicated? Unity literally did it all for you, you just have to implement the function
@TackleProd
@TackleProd 4 жыл бұрын
There is a bug in the code... When standing still, the Linear drag is applied. So when I jump, I cant really jump that high. (The drag changes to 0 when already in the air, but then its too late) However, when running, the drag is 0, and I can jump really high... I dont know how to fix this yet, Ive tried a lot of things...
@memoal-said5111
@memoal-said5111 4 жыл бұрын
I got the same problem but I found out the source of the problem. It's the linear drag, that part of the code that's supposed to prevent the player from sliding when it changes directions. Sadly, I don't know the solution but at least the source of the problem was found.
@TackleProd
@TackleProd 4 жыл бұрын
@@memoal-said5111 Toshi 1 second ago Actually I found a better solution that doesnt mess with drag at all, but still gives that smooth movement. void MoveCharacter(float dir) //Dir is the control stick's input. 1 for right, -1 for left and all that. { Vector2 targetVelocity = new Vector2(dir * stats.maxSpeed, rb.velocity.y); //I have my maxSpeed in another script, but whatever. // And then smoothing it out and applying it to the character rb.velocity = Vector3.SmoothDamp(rb.velocity, targetVelocity, ref stats.m_Velocity, stats.m_MovementSmoothing); //SMOOTH DAMP is the key! My Stats movement smoothing is set to 0.05f. Works both when accelerating and stopping. }
@memoal-said5111
@memoal-said5111 4 жыл бұрын
Believe it or not. I actually solved this long ago but forgot about this post. My solution was just to use a boolean to check when the player jumps or not and it works. Without that boolean, the issue occurs and I'm surprised that fixed it. XD
@MariWeiss28
@MariWeiss28 3 жыл бұрын
thanks, come back man pls.
@tylermaxwell7599
@tylermaxwell7599 4 жыл бұрын
As soon as I added jumping i started sliding on the ground again after moving instead of coming to a halt like in the last tutorial
@juanchoavid123
@juanchoavid123 3 жыл бұрын
Hey, Excellent video, if you still answering, i normally use circle or sphere overlapping for detecting ground, I have seen people, like your case that use raycasting, is there any difference? like performance difference? or it doesn't matter in this case?
@YehielCertner
@YehielCertner 5 жыл бұрын
Hi, Great tutorial and a great channel! I implemented the jump and it works great, i want to implement a Platform Effector to some of my platform tiles but theres a problem since the raycast is touching the platform from below when jumping and it thinks the player touched the ground so it would go all up the platform in some heights, tried shortening the raycast but it doesn't work , any suggestions will be very helpful :)
@joshuabadgett7987
@joshuabadgett7987 5 жыл бұрын
Did you figure out how to fix this? I'm having the same problem.
@YehielCertner
@YehielCertner 5 жыл бұрын
@@joshuabadgett7987 didn't find a solution for it...probably gonna skip on effectors or if i'm brave enough ill change the raycast method to something else, either a collider box at the feet or the first method in this tutorial : kzbin.info/www/bejne/eX3biZ6JfsaCd8U
@smallbeanmusic2187
@smallbeanmusic2187 5 жыл бұрын
Joshua Badgett make sure you * by ground length and not ground layer , that's what I accidentally did
@YehielCertner
@YehielCertner 5 жыл бұрын
@@smallbeanmusic2187 ??
@smallbeanmusic2187
@smallbeanmusic2187 5 жыл бұрын
Yehiel Certner if you can't change the length it's because (probably) you multiplied (in your script) by ground layer and not ground length . If you didn't make this mistake then just try checking the video again
@lucas90gs
@lucas90gs 4 жыл бұрын
My character loses x velocity when he hits the ground after a jump. This feels like he is dragging a bit after every jump. What can be causing it? Did you change the physics material of your tiles?
@dylanfoster186
@dylanfoster186 4 жыл бұрын
i think what is is causing is is the increase of drag when the player is grounded
@mattendo021
@mattendo021 3 жыл бұрын
Changing the physics material is what worked for me
@yesgames7753
@yesgames7753 4 жыл бұрын
Omg this is so good!!!!!!!!!!!!!
@Litefeather_
@Litefeather_ 3 жыл бұрын
Wait where is the wall jump video?
@serpaolo7413
@serpaolo7413 4 жыл бұрын
When I run on the edge of platforms it "triggers" the squeeze animation, even though I wasn't even jumping, only running back and forth. Am I the only one with this issue? Any thoughts why?
@todd345
@todd345 4 жыл бұрын
are you still haveing this problem or did you fix it
@darick9637
@darick9637 4 жыл бұрын
You can make a video about Power Ups?
@efn5520
@efn5520 4 жыл бұрын
Can Anyone help me i jump higher when i run than when i stand still
@todd345
@todd345 4 жыл бұрын
just do if (rb.velocity.x > .5){ whatever you want }
@efn5520
@efn5520 4 жыл бұрын
@@todd345 i don't know what to write after that
@todd345
@todd345 4 жыл бұрын
@@efn5520 in "whatever you want" just make jumpSpeed go up by 1 or what ever you want.
@efn5520
@efn5520 4 жыл бұрын
@@todd345 My jump also got smaller when i stand still
@memoal-said5111
@memoal-said5111 4 жыл бұрын
I actually had the same issue as you did. My solution was to use a new boolean called "jumped" and set it to false. I added that boolean to the code that handles linear drag to stop the character from sliding. It's this piece of code you should have in your script if you followed the video fully. Void modifyPhysics() { ... If(Mathf.abs(direction.x) < 0.4 || changingDirection) ... Change the if statement to this instead: If ((Mathf.Abs(direction.x) < 0.4f || changingDirection) && !jumped) The jumped boolean turns true whenever the player pressed down the key that makes the character jump and the book turns first if the player touches the ground again. Also, add the bool inside your key press code that has the function Jump() BEFORE it so it works. I hope it works for you like it has for me.
@rodrigofierro2212
@rodrigofierro2212 4 жыл бұрын
Guys, I need help. The part where the player has high jump and low jump isn't working. My code is the same as in the tutorial, but for some reason, when I press "jump" it only goes so high, no matter if I hold or just tap the button.
@efn5520
@efn5520 4 жыл бұрын
Use a tutorial called better jumping it will work
@todd345
@todd345 4 жыл бұрын
ya use blackthorn prod
@TackleProd
@TackleProd 4 жыл бұрын
The linear drag is 0 when running, and 4 when standing still. When jumping, the height of the jump is affected by the values I mentioned. I don't know how to fix this problem. When standing still, I cant jump that high. only when running, I get max jumping potential. Anyone else getting this problem and know how to fix it?
@AnimusBehemoth
@AnimusBehemoth 4 жыл бұрын
I had that problem before I made the changes to 'modifyPhysics' that includes changing the rigidBody gravityScale and drag values.
@TackleProd
@TackleProd 4 жыл бұрын
@@AnimusBehemoth Can You please share your code on how you fixed it? :)
@TackleProd
@TackleProd 4 жыл бұрын
Actually I found a better solution that doesnt mess with drag at all, but still gives that smooth movement. void MoveCharacter(float dir) //Dir is the control stick's input. 1 for right, -1 for left and all that. { Vector2 targetVelocity = new Vector2(dir * stats.maxSpeed, rb.velocity.y); //I have my maxSpeed in another script, but whatever. // And then smoothing it out and applying it to the character rb.velocity = Vector3.SmoothDamp(rb.velocity, targetVelocity, ref stats.m_Velocity, stats.m_MovementSmoothing); //SMOOTH DAMP is the key! My Stats movement smoothing is set to 0.05f. Works both when accelerating and stopping. }
@TackleProd
@TackleProd 4 жыл бұрын
Forgot to say, the value of ref stats.m_Velocity is vector3.zero.
@AnimusBehemoth
@AnimusBehemoth 4 жыл бұрын
@@TackleProd That looks like an awesome solution! I'll have to try that
@avve558
@avve558 5 жыл бұрын
Great video. You earn more subs then you have! :)
@draggmaste
@draggmaste 3 жыл бұрын
Hey! Great tutorials! But one thing, I've tried this tutorial now from scratch acouple of times. My character seem to jump the same distance, no matter how hard or light I press the jump button... Don't know if there's something I'm missing :(
@lerougeun4099
@lerougeun4099 3 жыл бұрын
Hey i got the same problem here did you find a solution ?
@lerougeun4099
@lerougeun4099 3 жыл бұрын
ok i found a fix don't worry !
@draggmaste
@draggmaste 3 жыл бұрын
@@lerougeun4099 I didn't find one :o Would you care to share?
@daniellete9049
@daniellete9049 3 жыл бұрын
@@draggmaste Make sure youre using GetButton instead of GetButtonDown when setting up the gravityScale and fallMultiplier. That did it for me
@ibrahemrafee2397
@ibrahemrafee2397 4 жыл бұрын
great tutorial but how can I make him do double jump ??
@QvsTheWorld
@QvsTheWorld 4 жыл бұрын
Add propterties extraJumpTotal(starts at 0) and extraJumpMax(1 for a normal double jump and 2 for triple jump). Then, where you check for jumpTimer && onGround add and else if to see if you have extra jumps left. if(jumpTimer > Time.Time && onGround){ jump(); }else if(extraJumpTotal < extraJumpMax ){ jump(); //
@smokinglife8980
@smokinglife8980 2 жыл бұрын
Regular ray cast are not good for ground detection and stuff. 1. Walk to the very edge of a block or something you will not be grounded and there is one more problem I just forgot. I would you a sphere cast and box cast it’s will cover more thank just a single line so ground checks are more accurate imo
@kaiser9321
@kaiser9321 5 жыл бұрын
I don’t understand why you would make IEnumerators for your sprite squeezing when you could make separate animations for them and store them in a separate layer in your animator
@voidling2632
@voidling2632 4 жыл бұрын
9:33 nope... its actually the opposite, holding jumbutton = short jump and tap long jump... looks pretty much like in this video: rb.gravityScale = gravity; if (rb.velocity.y < 0) { rb.gravityScale = gravity * fallMultiplier; } else if (rb.velocity.y > 0 && (Input.GetKey(KeyCode.Space) || Input.GetKey(KeyCode.UpArrow) || Input.GetKey(KeyCode.W))) { rb.gravityScale = gravity * (fallMultiplier/2); }
@VickoProject
@VickoProject 4 жыл бұрын
Omg thanks🔥🔥🔥 im having trouble with that and i just search it for a long time, and u juts get the answer, thanks a lot😂🔥
@Space_Masters
@Space_Masters 5 жыл бұрын
Great tutorial, but I feel I must point out that it's pronounced "Co-Routine" not "Quarantine"
@pressstart6864
@pressstart6864 5 жыл бұрын
Haaaaa thanks
@user-px4zh3dr2x
@user-px4zh3dr2x 3 жыл бұрын
9:08 don't use input.getkeydown instead of input.getkey or input.getbutton why i don't know but this took 2 days from me
@dadosvk2854
@dadosvk2854 4 жыл бұрын
Please help me, how to make my own pixelart in some online app? ....
@janinmarquez-medina6265
@janinmarquez-medina6265 4 жыл бұрын
I would use Medibangpaint. I have photoshop and ClipStudio Paint and it its just a nicer free program in case you're still looking for one.
@dadosvk2854
@dadosvk2854 4 жыл бұрын
@@janinmarquez-medina6265 Thanks ♥️
@donglesband
@donglesband 2 жыл бұрын
You saved me from glitchy physics hell
@TheCrippledWerewolf
@TheCrippledWerewolf 4 жыл бұрын
Now explain to me how to make a Bubsy 3D style jump and you will truly have become the master.
@ZodakZach
@ZodakZach 4 жыл бұрын
The ray cast method to see if you’re grounded isn’t very good because u won’t be able to jump if your character id more than half way off a ledge u should really use boxcast
@hunterc4881
@hunterc4881 3 жыл бұрын
Did you watch the whole video?
@YourBoyDonald
@YourBoyDonald 4 жыл бұрын
I LIKED THIS VIDEO AND HE GOT 1K LIKES FIRST IT WAS 999
@Linkforce98
@Linkforce98 3 жыл бұрын
Hey, nice Tutorial. I use your Script. The movement worked. But the Jump don't
@BoltGoesPro
@BoltGoesPro 3 жыл бұрын
BTW GUYS, do not use a raycast, use a boxcast, it's similar to a raycast but it simulates a box so if you are still touching the ground but off the edge you will still be able to jump!!!!!
@emredesu
@emredesu 3 жыл бұрын
Thanks for the suggestion, that's much easier than writing complex code for 2 raycasts!
@BoltGoesPro
@BoltGoesPro 3 жыл бұрын
@@emredesu :) I have code and stuff always willing to help people if you have questions
@emredesu
@emredesu 3 жыл бұрын
@@BoltGoesPro I appreciate it! No questions for now, but I'll let you know if I have any c:
@BoltGoesPro
@BoltGoesPro 3 жыл бұрын
@@emredesu okay :)
@BoltGoesPro
@BoltGoesPro 3 жыл бұрын
@@emredesu I've had to fix many people as code online to use it efficiently. So if you ever want me to check it out, I like helping everyone: D
@pvzdbanimations8866
@pvzdbanimations8866 3 жыл бұрын
2:23
@forgost1254
@forgost1254 4 жыл бұрын
u'r cool
@s4shrish
@s4shrish 4 жыл бұрын
14:32 "Since this is a QUARANTINE" Well, he's a fortuneteller with futuresight as well.
@iteratedofficial
@iteratedofficial 4 жыл бұрын
oh my
@chosenvan
@chosenvan 4 жыл бұрын
hi there. first of all, thanks for this great tutorial. its very very useful for me. And second, I realised that you used a few second part of brackeys video at 1:30 but at the end of tutorial you didnt thank to him :) just reminding ;) thanks again for tutorial...
@abelhernandez9405
@abelhernandez9405 4 жыл бұрын
Those are all FREE STOCK ASSETS from the Asset Store. Why the fuck would he need to thank Brackeys?!
@evonescent5451
@evonescent5451 3 жыл бұрын
Suggestion: bool DirectionChanged => Mathf.Sign(HorizontalAxisValue) != Mathf.Sign(rb.velocity.x); Instead of: bool changingDirections = (HorizontalAxisValue > 0 && rb.velocity.x < 0) || (HorizontalAxisValue < 0 && rb.velocity.x > 0); 🙂
@marmikemp3767
@marmikemp3767 3 жыл бұрын
Nice but please use dark mode😭
@SageNode
@SageNode 4 жыл бұрын
once again you rush and skip showing the animation transitions at the end of this video just like you did in the first video..... man
@BobrLovr
@BobrLovr 4 жыл бұрын
figure it out lmao its not hard.
@SageNode
@SageNode 5 жыл бұрын
What happened to see you next week!?
@SageNode
@SageNode 4 жыл бұрын
play the speed at 0.5 from 16:25 and he sounds drunk
@linzenmeyer
@linzenmeyer 3 жыл бұрын
This uses the OLD input methods.
Improve your Platformer’s Jump (and Wall Jump) | Unity
8:12
Dawnosaur
Рет қаралды 136 М.
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Better Jumping in Unity With Four Lines of Code
12:47
Board To Bits Games
Рет қаралды 826 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,4 МЛН
Recreating Super Mario's Jump
9:32
Pontypants
Рет қаралды 70 М.
How to jump in Unity (with or without physics)
16:09
Game Dev Beginner
Рет қаралды 51 М.
How I made an Excellent Platformer
8:25
GoldenEvolution
Рет қаралды 301 М.
We made 3 games in 1 hour | Game Dev Battle
12:49
GameDev.tv
Рет қаралды 318 М.
5 Reasons Your Indie Platformer Game Sucks! (+Easy Fix!)
6:39
Jonas Tyroller
Рет қаралды 239 М.
6 DEVS Make a GAME without COMMUNICATING!!
13:53
Blackthornprod
Рет қаралды 1,8 МЛН
Pixel Art Tips from a Professional Artist - Tips & Tricks
8:01
Goodgis
Рет қаралды 1,2 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН