2D JUMP IN UNITY IN UNDER 1 MINUTE
Ойындар
#shorts
Enjoy the video, if you have any questions ask in the comments down below!
Request a tutorial here:
forms.gle/JLBkpHt1ZFLpn7TE9
Patreon with fully explained c# scripts:
/ blakeygames
Main Channel: / bblakeyyy
DISCORD SERVER LINK: / discord
unity,unity tutorial,unity 2d tutorial,unity 2d,unity jump,unity 2d jump tutorial,unity 2d jump,unity 2d jump c#,unity jump tutorial,unity 2d smooth jump,unity3d,simple 2d jump in unity,unity tutorial 2d,unity 2d platformer,unity tutorial for beginners,unity 3d,unity game tutorial,2d,how to jump unity,unity short tutorial,how to jump in unity,unity jumping,unity jump code,unity 2d celeste,unity platformer,2d jump in unity Audio used in my videos:
♪ Onion (Prod. by Lukrembo)
Link : • (no copyright music) l...
♪ Branch (Prod. by Lukrembo)
Link : • (no copyright music) c...
♪ Biscuit (Prod. by Lukrembo)
Link : • (no copyright music) l...
♪ Bread (Prod. by Lukrembo)
Link : • (no copyright music) j...
Пікірлер: 68
THANK U SO MUCH BRO this helped so much i have been trying to find a decident jump script for days and i find this vid u helped so much keep up the good work
For anyone confused about the variables, basically a float is a number value, it allows decimals. A int doesn't allow decimals into their value. And the difference between private and public is that private only gives the script the information that the variable has and public allows information that the variable has outside the script, making it being configurable outside the script too.
@cgillis3989
5 ай бұрын
We came to this one minute tutorial to NOT hear all the explanations (Jk, I'm just teasing- it's always a good idea to understand the variables lol. Thank you)
@MattQwerty-qw8xv
Ай бұрын
ДА НУ НАХУЙ, Я НЕ ЗНАЛ
This is a life breaker I just got pure errors one after the other
THANK YOU. Your video is short, but very informative, thanks😊
What about the ground check? Currently you’ can just jump forever essentially flight.
@kryuza3191
Жыл бұрын
just add collision, whenever the player is collsion to the ground its ready to jump but whenever the player is not touching the ground its not ready to jump
@gianlucapapa1508
Жыл бұрын
@@kryuza3191 how can I add it? it's my first time doing it
@kryuza3191
Жыл бұрын
@@gianlucapapa1508 kzread.info/dash/bejne/laikp9qJaKrHmbQ.html&ab_channel=bblakeyyy
@X45Saucr
Жыл бұрын
@@gianlucapapa1508 hes not gonna answer it since its 4 months old
@JakeSimmer
Жыл бұрын
@@gianlucapapa1508 find other 2dvids bro, 'isjumping' = tru, they put that in the ifstatement. would be cool to keep on jumping tho... Keep on trucking and trying. I only just started and those first steps are soo hard, but allmost there to understand c#... ;-)
Very concise and effective, thank you very much :)
Bro what mine just flyies into the stratosphere
No fixedupdate for jump collision via layers?
Have a full player movement script available on my Patreon: www.patreon.com/BlakeyGames
So how do i jump aka how do i do the jump key?
Thank you so much ❤
How to do a dash in a topdown game by using the new input system?
How can I make it so it won’t fly if you hold it
Why do you prefer default force over impulse?
COOL!
thank you
Thanks
It says that I need a jump input can you help me out😅
keep going
how do i bind the jump key to space? it is not binded to any key just "Jump" which is not a key
@Isaac096
7 ай бұрын
Ya idk how to do that
@hello.4693
27 күн бұрын
Old input system: bool isJumping = Input.GetKeyDown(KeyCode.Space); use this in if statement like if(isJumping)
can you have tutorial on how to give the caracter animation with that script
@CrayZeeAnimations
Жыл бұрын
Use animation controllers (in the controller use transition arrows, parameters, and conditions)
When I click on the script in unity the float doesn’t appear but I put in the float what’s wrong?
@achillejeanvoine8115
Жыл бұрын
Be sure that it is public or SerializedField private
you should add a time.deltatime moltiplication
@toontween
Жыл бұрын
in this case it would be forcemode.impulse
@iamstill1451
9 ай бұрын
What is the use of delta time I am new to all this so idk also this method is more simpler
It said cannot convert ‘float’ to ‘string’. Pls help
@blazer6972
11 ай бұрын
same for me. I dont know why.
i really never tried to make a game it'll be bad😐
knowing how to define the jump key would be nice..
@Gamemaker_101
3 ай бұрын
Thats Space
@slimecraft7620
7 күн бұрын
pretty sure that's what the Input.GetButtonDown is
How do you set the jump key to a mouse click
@tntobi80
Жыл бұрын
for a left click its mousebutton 1 and right click mousebutton 2
@fillowskyy
Жыл бұрын
if (Input.GetKey(KeyCode.LeftMouseButton)
Lifesaver
what do you mean about the jump float
@annoyingdog9646
Жыл бұрын
He means make the character jump more like a person and less like a balloon
@SonicMonke
Жыл бұрын
@@annoyingdog9646 no like when he says multiply by the jumjp float
interact
just as I guessed you're BRI'I'SH
@morebblakeyyy
Жыл бұрын
Sherlock has arrived
can you please give me the source code?
@X45Saucr
Жыл бұрын
heres the script so i can save u $8.50 using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerJump : MonoBehaviour { private Rigidbody2D rb; public float jump; // Start is called before the first frame update void Start() { rb = GetComponent(); } // Update is called once per frame void Update() { if (Input.GetButtonDown("Jump")) { rb.AddForce(new Vector2(rb. velocity.x, jump)); } } }
can I have the code?
@Hietakissa
Жыл бұрын
@@unitylearning8736 that's not a better way of doing it, just different. In your example you are overriding the player's velocity, which may not always be wanted. Alternatively you could use AddForce but use ForceMode.Impulse and run it once so it works the same but doesn't override the velocity.
@unitylearning8736
Жыл бұрын
@@Hietakissa Not really overriding the velocity, we are setting velocity to equate to a locked Vector instead of instantiating a new Rigidbody velocity every frame. Say you want to create a variable that controls jump height, you will keep needing to add a new Rigidbody velocity.. Using this method, you can just modify the Vector2. Simple, easy, and much more efficient.
@Hietakissa
Жыл бұрын
@@unitylearning8736 Yeah I guess I didn't fully read your comment. My point was that if the player were falling and jumped the downwards velocity would have no effect on the jump which may not always be desired, but that could easily be fixed just by setting the y velocity to rb.velocity.y + jumpForce instead. You could also use AddForce, so you still wouldn't be creating a new Vector3 every time you jump. Realistically this won't have any effect on performance but you are right it's better to just set the values of the existing Vector instead creating a new one and generating that 96 or so bits of garbage.
@ignacio3312
Жыл бұрын
@@unitylearning8736 can you change the original code to match your changes?
@unitylearning8736
Жыл бұрын
@@ignacio3312 I can create a KZread video so that you will learn out of it. Also can create ground check function because I don't believe it is showcased here..
What do I do with “Assets\playerJump.cs(20,58): error CS1002: ; expected”?
@skycloud97
4 ай бұрын
That means I think on line 20 there is no semi colon at the end
@slimecraft7620
7 күн бұрын
@@skycloud97 i tried that and it still doesn't work
@skycloud97
7 күн бұрын
@@slimecraft7620 i might have gotten that wrong do you know where the error line is? Or if you’re lazy like me use chatgpt to check it just throw the code and it will probaly fix it also i have took a long break from unity