Unity Basic Movement 3D Tutorial for Beginners (Simple move & Jump with a Cube)

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ม.ค. 2025

ความคิดเห็น • 273

  • @deeppatel6705
    @deeppatel6705 2 ปีที่แล้ว +23

    Bro 22 min Thats it..... I am literally watching every tutorials and reading any book I can find on coding ( Since I dont know a c about coding ). You are best bro love it plzzz can you try to make make more coding tutorials like this for absolute beginners who dont know any coding....... AND AGAIN CHEERS DUDE......

  • @KDHD.12
    @KDHD.12 2 ปีที่แล้ว +31

    This is so much simpler than every other explanation I’ve found ❤
    Plus your code is so straight forward

  • @arkothegamedev
    @arkothegamedev ปีที่แล้ว +1

    wow!i have watched like 15 tutorials and none of them worked.i almost gave up but then i saw this tutorial.thank you very much!

  • @amaxunny7973
    @amaxunny7973 3 ปีที่แล้ว +25

    Best Tutorial Ever... Honestly helped so much the speed of the video was perfect you explained everything so well and made it the easiest possible... Thanks you so much!

  • @nitrogenFox
    @nitrogenFox 2 ปีที่แล้ว +2

    This was super helpful, really underappreciated tutorial. Thought I'd throw you (and anyone else that might be involved in the channel) something

    • @BuvesaGameDevelopment
      @BuvesaGameDevelopment  2 ปีที่แล้ว +2

      Thx a lot, I really appreciate it! Glad you liked the tutorial ;)

  • @MasekV45
    @MasekV45 2 ปีที่แล้ว +4

    Thanks, I was trying to make a movement by tutorials on youtube but no one didn't work except this one thanks man really works

  • @arjunsolution1565
    @arjunsolution1565 10 หลายเดือนก่อน +1

    Thank you bro i tried to learn at least the basics of c# script but i couldn't find a single video which explained it well . But your video was the best i think i understood it very well and your codes thanks ❤😊

  • @staticplays1871
    @staticplays1871 ปีที่แล้ว +5

    thank you, a basic explanation is all I needed, you don't know how many videos don't do this

    • @SnatchBandegrip
      @SnatchBandegrip ปีที่แล้ว

      Right? So many of these tutorials don't explain the code, and the code is often extremely convoluted. This one is very good though.

  • @qwasoun1095
    @qwasoun1095 2 ปีที่แล้ว +12

    5 minutes in and you've already taught me more than all the other videos that I've watched for weeks combined. Great video my guy!

    • @BuvesaGameDevelopment
      @BuvesaGameDevelopment  2 ปีที่แล้ว +1

      Thanks! Great it clicked for you

    • @shiningsword5306
      @shiningsword5306 2 ปีที่แล้ว

      @@BuvesaGameDevelopment hey can I explain to me what is the function and different between the"void start" and the "void update"?I still don't get it😅

  • @tadeastehan7275
    @tadeastehan7275 3 ปีที่แล้ว +8

    Thanks! I am learning with unity a C sharp and I found you. You are a good teacher for me :) I will be very happy if you continue with this creation. Thanks again!

    • @BuvesaGameDevelopment
      @BuvesaGameDevelopment  3 ปีที่แล้ว

      Thx! Will do my best ;)

    • @tadeastehan7275
      @tadeastehan7275 3 ปีที่แล้ว

      @@BuvesaGameDevelopment Pleasem, do you know how to do if the object is on side and he cant jump over. I mean some reset of the object.

    • @BuvesaGameDevelopment
      @BuvesaGameDevelopment  3 ปีที่แล้ว

      You could create a boolean to check if the player is on a certain side. If he is, apply the logic.

  •  2 ปีที่แล้ว +1

    You are the best! I'm a totally noob in C# and Unity, i spend 4 days to create movements what i want and every guide is did not fit, but you saved me!

  • @luismurillo6837
    @luismurillo6837 2 ปีที่แล้ว +1

    Thank you so much, I was looking for some videos weeks ago and nothing until found yours… I appreciated a lot.

    • @paineculapte4566
      @paineculapte4566 2 ปีที่แล้ว

      what visual studio version you have?

  • @manrock1924
    @manrock1924 3 ปีที่แล้ว +9

    Thanks! Getting into unity and was a good explanation of a bunch of the basic stuff!

  • @kacpermere8802
    @kacpermere8802 ปีที่แล้ว

    Did something wrong at first so I restarted the process and it works. Thanks a lot.

  • @therockman4485
    @therockman4485 2 ปีที่แล้ว +3

    This had helped me with the isGrounded problem! Thank you so much!

  • @hristiyanaleksandrov198
    @hristiyanaleksandrov198 2 ปีที่แล้ว +1

    Man, you can be a teacher, definitely have the skills. Thank you for the tutorial!

  • @katez.6052
    @katez.6052 2 ปีที่แล้ว +1

    lowkey the best movement video tutorial and really direct, thank you!

  • @Kingofther3gion
    @Kingofther3gion 2 ปีที่แล้ว +1

    Thanks!

  • @Kawennirok
    @Kawennirok 2 ปีที่แล้ว +3

    only youtuber that explains why the code is in that place and what it does

  • @didyouknow19256
    @didyouknow19256 2 ปีที่แล้ว +2

    Amazing tutorial! I have some experience with c++ and Blender, but none with C# and Unity. This tutorial helped me a lot and I will recommend it to anyone who wants to learn Unity.

    • @BuvesaGameDevelopment
      @BuvesaGameDevelopment  2 ปีที่แล้ว +1

      Thx!

    • @God-T
      @God-T 2 ปีที่แล้ว

      @@BuvesaGameDevelopment can you make another video on how to make an fps shooter game? How to spawn in & kill enemies and how to attach & make a functional weapon? It be amazing. 😀 pls keep up the Great work 👍 I love your channel!!

    • @OhGOD300
      @OhGOD300 ปีที่แล้ว

      @@God-Toof 1 year ago and no reply

    • @God-T
      @God-T ปีที่แล้ว

      @OhGOD300 🥲 bro, i was in college a Yr ago and had a 2 week deadline to make a game. U don't know the worst of it. Pain, pain,loop of pain

  • @lilianaasa
    @lilianaasa 2 ปีที่แล้ว +1

    thank you for this tutorial, i feel like i'm FINALLY beginning to understand !

  • @kroigaming8544
    @kroigaming8544 2 ปีที่แล้ว +1

    Thank u soo much, i was looking for soo long for a video and i found this one and im really thankful to u

  • @SireKamui
    @SireKamui ปีที่แล้ว +1

    Thank you for this tutorial i was expecting something hard because of video length despite the video name but it was very easy to understand.

  • @RIVAL2009
    @RIVAL2009 2 ปีที่แล้ว +1

    Thank you soooo much!! I'm going to watch this vid every day so I can memorize everything without any help!

  • @chiiiiill_bro
    @chiiiiill_bro 9 หลายเดือนก่อน +1

    I got jumpscared when the code magically appeared out of nowhere

  • @backfromtheash5882
    @backfromtheash5882 ปีที่แล้ว

    so nice finding a video that explaines what the code means instead of just giving it to me

  • @buckgb2767
    @buckgb2767 7 หลายเดือนก่อน

    Wonderful tutorial, it still works great to this day. I learned a lot and can't wait to reference these scripts for future projects!

  • @Flyingsandwiches-nr1zc
    @Flyingsandwiches-nr1zc 2 ปีที่แล้ว +2

    Thank you so much I had to add code to make my character jump for an assignment and you helped me thank you you're a life saver 👏

  • @elakstein
    @elakstein 3 ปีที่แล้ว +3

    Extremely good. These videos will help people forever 👍

  • @KhaledA.H
    @KhaledA.H 2 หลายเดือนก่อน

    This is GREAT detailed tutorial. Thanks a lot!!👍

  • @potatogyt8948
    @potatogyt8948 2 ปีที่แล้ว +1

    Thanks for being descriptive i litterly knew nothing about unity

  • @thereal_bolt
    @thereal_bolt 2 ปีที่แล้ว +1

    THANK YOU I HAVE BEEN TRYING FOREVER GODD BLESS YOU

  • @DrakeDrizzyBell
    @DrakeDrizzyBell ปีที่แล้ว

    One of the best tutorial ever. helped me out so much thanks bro.

  • @anhvuquang7906
    @anhvuquang7906 3 ปีที่แล้ว +2

    You saved my life, Thank you so much

  • @johntyler-ev9xc
    @johntyler-ev9xc ปีที่แล้ว

    So detailed and such a good explanation. Love your content, keep it up!

  • @osiris1071
    @osiris1071 ปีที่แล้ว

    this was really helpfull and made everything clear for me ty very much and keep up with good contents like this one

  • @tHEshAMOT
    @tHEshAMOT ปีที่แล้ว

    Díky!

  • @mazzvr839
    @mazzvr839 2 ปีที่แล้ว +6

    scripts:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class PlayerMovement : MonoBehaviour
    {
    public float speed = 5.0f;
    public float jumpAmount = 5.0f;
    public bool isOnGround = true;
    private float horizontalInput;
    private float fowardInput;
    private Rigidbody playerRb;
    void Start()
    {
    playerRb = GetComponent();
    }
    void Update()
    {
    // get player input
    horizontalInput = Input.GetAxis("Horizontal");
    fowardInput = Input.GetAxis("Vertical");
    // Move the player foward
    transform.Translate(Vector3.forward * Time.deltaTime * speed * fowardInput);
    transform.Translate(Vector3.right * Time.deltaTime * speed * horizontalInput);
    // Let the player jump
    if (Input.GetKeyDown(KeyCode.Space) && isOnGround)
    {
    playerRb.AddForce(Vector3.up * jumpAmount, ForceMode.Impulse);
    isOnGround = false;
    }
    }
    private void OnCollisionEnter(Collision collision)
    {
    if (collision.gameObject.CompareTag("Ground"))
    {
    isOnGround = true;
    }
    }
    }

  • @kiwiguy_mc1458
    @kiwiguy_mc1458 3 ปีที่แล้ว +2

    Bro thank you soooo Much😁🤩 i just started in unity and this help me so much very much thank you😁😁😁👑👑

  • @gardud7
    @gardud7 ปีที่แล้ว +2

    when i type OnCollisionEnter visual studio doesnt do the autofill thing. how can i fix it? when i manually type private void OnCollisionEnter(Collision collision) it doesnt work

  • @SimonKosorovich
    @SimonKosorovich 11 หลายเดือนก่อน

    Very nice video, simple to understand, helped me a lot for my game, thank you so much!

  • @manaraldama
    @manaraldama 2 หลายเดือนก่อน

    good job mann keep going
    I really appreciate you

  • @richallenxbox1976
    @richallenxbox1976 2 ปีที่แล้ว +1

    Yeah it's pretty cool this! I might have a go after tea!

  • @Rubkinz
    @Rubkinz 3 ปีที่แล้ว +1

    ok for real this actually worked for me, only one that worked!!

  • @abhaycoachinginstituteeduc8205
    @abhaycoachinginstituteeduc8205 ปีที่แล้ว

    yup your video is very helpful even in 2023

  • @clloner4016
    @clloner4016 3 ปีที่แล้ว +1

    Thanks bro, you saved my life.

  • @3hroned
    @3hroned 2 ปีที่แล้ว +1

    Really good video helped me alot the explanations were so good I understood the whole thing. Thank you 😊

  • @mamadpars2981
    @mamadpars2981 3 ปีที่แล้ว +1

    Hello, you are the best TH-camr😉😀😀😀😀😀😉😁😊🤣

  • @thellamasorcerer4785
    @thellamasorcerer4785 ปีที่แล้ว +2

    Input axis vertical not set up
    How do I fix this Error message?.

  • @ivankalynovskyi3248
    @ivankalynovskyi3248 2 ปีที่แล้ว +1

    This is very useful video, thank you

  • @mercedeslowe2912
    @mercedeslowe2912 ปีที่แล้ว +1

    Im going to give credit to you in my game thank you

  • @elumiie
    @elumiie ปีที่แล้ว +1

    At 11:00 it somehow doesn't work for me. I copied every step 100%. It will move left and right, but moving forward will make it hover up and moving backwards will make it collide with the ground 🤔

  • @Wynnings
    @Wynnings ปีที่แล้ว

    amazing bro... make more like this please!

  • @andorazafy
    @andorazafy ปีที่แล้ว +1

    Very Good explanation

  • @CopyCatBlack
    @CopyCatBlack 2 ปีที่แล้ว +1

    Thank you soo much man please do make alot coding tutorial for beginners:)

  • @bloxxermachine382
    @bloxxermachine382 ปีที่แล้ว +2

    I have a problem. It gave me an error that part of the code wasnt there when it was and i saved it countless times.

  • @HPPH1972
    @HPPH1972 2 ปีที่แล้ว +1

    Thanks this tutorial is useful

  • @trinity6880
    @trinity6880 3 ปีที่แล้ว +2

    Very nice, thank you!

  • @SertoriusGD
    @SertoriusGD 10 หลายเดือนก่อน

    THANK U!!!! this is a very very good Video

  • @w0tnessZA
    @w0tnessZA 2 ปีที่แล้ว +1

    Thanks mate!

  • @giozen4871
    @giozen4871 3 ปีที่แล้ว +1

    Great Tutorial

  • @KingCerberoCH
    @KingCerberoCH ปีที่แล้ว +3

    Here is the code:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class NewBehaviourScript1 : MonoBehaviour
    {
    public float speed = 5f;
    public float jumpForce = 5f;
    public bool isOnGround = true;
    private float horizontalInput;
    private float forwardInput;
    private Rigidbody playerRb;
    // Start is called before the first frame update
    void Start()
    {
    playerRb = GetComponent();
    }
    // Update is called once per frame
    void Update()
    {
    // get player Input
    horizontalInput = Input.GetAxis("Horizontal");
    forwardInput = Input.GetAxis("Vertical");
    // Move the player forward
    transform.Translate(Vector3.forward * Time.deltaTime * speed * forwardInput);
    transform.Translate(Vector3.right * Time.deltaTime * speed * horizontalInput);
    //Let the player jump
    if (Input.GetKeyDown(KeyCode.Space) && isOnGround)
    {
    playerRb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
    isOnGround = false;
    }
    }
    private void OnCollisionEnter(Collision collision)
    {
    if (collision.gameObject.CompareTag("Ground"))
    {
    isOnGround = true;
    }
    }
    }

  • @omagula3534
    @omagula3534 3 ปีที่แล้ว +1

    Super useful, thanks!

  • @mmazuk1958
    @mmazuk1958 3 ปีที่แล้ว +1

    Thanks for a tutorial.

  • @Iam7B6969
    @Iam7B6969 2 ปีที่แล้ว +14

    Code
    public float speed = 5.0f;
    public float jumpForce = 5;
    public bool isOnGround = true;
    private float horizontalInput;
    private float forwardInput;
    public Rigidbody playerRb;
    // Start is called before the first frame update
    void Start()
    {
    playerRb = GetComponent();
    }
    // Update is called once per frame
    void Update()
    {
    // get player input
    horizontalInput = Input.GetAxis("Horizontal");
    forwardInput = Input.GetAxis("Vertical");
    // Move the player forward
    transform.Translate(Vector3.forward * Time.deltaTime * speed * forwardInput);
    transform.Translate(Vector3.right * Time.deltaTime * speed * horizontalInput);
    //Let the player jump
    if (Input.GetKeyDown(KeyCode.Space)) && isOnGround)
    {
    playerRb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
    isOnGround = false;
    }

  • @mushinart
    @mushinart ปีที่แล้ว

    Amazing stuff really, but what if i wanted to add 3d joysticks .. one for the movements shown in the video, and other to make the camera rotate ....please help

  • @Pvinini
    @Pvinini 3 ปีที่แล้ว +1

    absolutely poggers video

  • @videogamegooners
    @videogamegooners 5 หลายเดือนก่อน

    I was about to write a mean comment about how it didn’t work until I realized I spelled forward wrong LOL great video😭

  • @aquafina2on217
    @aquafina2on217 3 ปีที่แล้ว +1

    THANK YOU SO SO MUCH!

  • @BernolexTF2
    @BernolexTF2 ปีที่แล้ว

    Thank you Im gonna make my own game but I don't know anything
    Now I know

  • @bernardbosman1149
    @bernardbosman1149 2 ปีที่แล้ว +2

    This was helpfull

  • @ljakobsen7785
    @ljakobsen7785 2 ปีที่แล้ว +3

    Amazing content!
    Somehow my Player will only jump once per game I play, the Player did jump multiple times before removing the "flappy bird" effect :S
    I've been coding 4 days from youtube vids so nothing makes sence for me yet haha :)

    • @BuvesaGameDevelopment
      @BuvesaGameDevelopment  2 ปีที่แล้ว +1

      Best to redo (at least) that part of the tutorial and really follow step by step. The smallest typing mistake, misclick or forgetting the ; could cause bugs

    • @ljakobsen7785
      @ljakobsen7785 2 ปีที่แล้ว +1

      @@BuvesaGameDevelopment Thanks for the advice and reply. I'll give u a few more views I Guess :D

  • @goldenpotato5327
    @goldenpotato5327 3 ปีที่แล้ว +1

    Thanks, man, much love! +1 sub

  • @maitrykotak3703
    @maitrykotak3703 ปีที่แล้ว

    please put a button for up down left and right ...that will b much appreaciated,,,

  • @justapug3438
    @justapug3438 ปีที่แล้ว

    Great tutorial, but I’d there a way to code in double jump?

  • @origames1724
    @origames1724 3 ปีที่แล้ว +1

    best tutorial!!!!

  • @owen7w7
    @owen7w7 2 ปีที่แล้ว +1

    thank you, thank you, thank you

  • @iliesouldmenouer
    @iliesouldmenouer 10 หลายเดือนก่อน

    Amazing thank you

  • @Just__Josh
    @Just__Josh ปีที่แล้ว +1

    Is anyone else having problems with this part? 3:50 - 3:58

  • @dzmo-official
    @dzmo-official 2 ปีที่แล้ว +1

    I wish I found this earlier

  • @Gigapally
    @Gigapally ปีที่แล้ว

    I have a question for this, while it is working in my project, what if the object the player is standing on isnt "ground"? I could assign other objects the "Ground" tag which fixes this issue, but is that really the best practice for this? I feel like this would cause other issues in the future, for example if you are playing a building game and want something to have a different tag than "Ground". It also seems that since im using the default capsule collider that I am able to double jump when going up cubes in certain ways.

  • @johnmanjohnston
    @johnmanjohnston 3 ปีที่แล้ว

    Whats the point of using transform.Translate() if you have a rigidbody? The best thing to do is make a new vector and set the input in that vector and set the rigidbodys velocity to that vector

  • @iconic2310
    @iconic2310 8 หลายเดือนก่อน

    time does not contain a definition for deltatime?

  • @leac7540
    @leac7540 ปีที่แล้ว +1

    It doesn't work for me it just says Playerposition.cs(7,26) error CS1002: ; expected. note: i renamed it to Player position

    • @BuvesaGameDevelopment
      @BuvesaGameDevelopment  ปีที่แล้ว

      The error message "Playerposition.cs(7,26) error CS1002: ; expected" indicates that there is a syntax error in your code. The compiler is expecting a semicolon (;) at line 7, column 26 of the file "Playerposition.cs".
      Without seeing the code in question, it's difficult to say exactly what the issue is, but based on the error message, it's likely that you have forgotten to include a semicolon at the end of a line of code.

    • @leac7540
      @leac7540 ปีที่แล้ว

      @@BuvesaGameDevelopment Here is the code so you can see it
      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      public class Playerposition : MonoBehaviour {
      public float walkingSpeed = 5.0f;
      private float horizontalInput;
      private float fowardInput;
      {
      // Start is called before the first frame update
      void Start()
      {

      }
      // Update is called once per frame
      void Update()
      {
      //get player input aka w a s d key responses.
      horizontalInput = Input.GetAxis("Horizontal");
      fowardInput = Input.GetAxis("Vertical");
      // moving the player foward w a s d / horizontal inputs
      transform.Translate(Vector3.foward * Time.deltaTime * speed * fowardInput);
      transform.Translate(Vector3.right * Time.deltaTime * speed * horizontalInput);
      }
      }

  • @ERIKHEADS
    @ERIKHEADS 7 หลายเดือนก่อน

    great tutorial when I found some thing did nit work I watched the rest of the video then you showed the code for the solution

  • @okayoni6342
    @okayoni6342 ปีที่แล้ว

    Thanks a ton!

  • @R4t_klng._.
    @R4t_klng._. ปีที่แล้ว +1

    Thank u so much

  • @Dusk0
    @Dusk0 3 ปีที่แล้ว +2

    hey very nice tutorial, i have one question : i tought using translate with a rigidbody wasn't very a good idea cause it cancel physics is that true ?

    • @BuvesaGameDevelopment
      @BuvesaGameDevelopment  3 ปีที่แล้ว

      In this tutorial we are using a player character and it behaves different than a physics body. You can go that route but then you have to code differently. If you want a simple way to move, this should work.

    • @Dusk0
      @Dusk0 3 ปีที่แล้ว +1

      @@BuvesaGameDevelopment okay thanks for your response !

    • @BuvesaGameDevelopment
      @BuvesaGameDevelopment  3 ปีที่แล้ว

      @@Dusk0 np!

  • @massimodgrv6681
    @massimodgrv6681 3 ปีที่แล้ว +2

    There is an error for me that I can't put the script in the player. How do I fix this?

  • @ricyalol
    @ricyalol 2 ปีที่แล้ว +1

    awesome, how did you get your editor to change to that color when playing scene?

    • @BuvesaGameDevelopment
      @BuvesaGameDevelopment  2 ปีที่แล้ว +1

      This will do the trick: th-cam.com/video/Imti1LOCI_8/w-d-xo.html

    • @ricyalol
      @ricyalol 2 ปีที่แล้ว

      @@BuvesaGameDevelopment no not the auto complete but the unity editor color overlay when hitting play to initialize scene

    • @BuvesaGameDevelopment
      @BuvesaGameDevelopment  2 ปีที่แล้ว +1

      Oh i forgot where but it was in unity color play settings somewhere in the menus

  • @diegoalejandromartinezespi6672
    @diegoalejandromartinezespi6672 2 ปีที่แล้ว +1

    Excelente!!! Gracias

  • @Ciac18
    @Ciac18 ปีที่แล้ว

    Thank you so much!!!!!!!

  • @jagazgaga
    @jagazgaga ปีที่แล้ว

    Could you give me this tutorial but for 2d movement and only the jumping thing? I can't make my character make the "isOnGround" be true when i touch the ground. The ground and the character both are have the "Ground" tag, so i don't know what's wrong with the jumping in my 2D project
    My 3D project works perfectly fine, but the 2D one has the problem with the jumping

  • @penut111
    @penut111 2 ปีที่แล้ว

    i have three errors and they say Vector3 doesn't currently exist in this context and GetAxis doesn't currently exist in this context and error CS1061: 'float' does not contain a definition for 'GetAxis' and no accessible extension method 'GetAxis' accepting a first argument of type 'float' could be found (are you missing a using directive or an assembly reference?)

  • @McDonaldsSprite247
    @McDonaldsSprite247 2 ปีที่แล้ว +2

    thanks

  • @CJMUSIC20
    @CJMUSIC20 2 ปีที่แล้ว +1

    Everything is working only space function is not working

  • @BadName412
    @BadName412 ปีที่แล้ว

    This is great

  • @Mr.Valentne
    @Mr.Valentne ปีที่แล้ว

    For some reason when I tried to start it to test it wouldnt let me and kept saying something was wrong when i copied everthing down i think its cause i wasnt using a cube but Idk

  • @thundershockcaiden
    @thundershockcaiden 8 หลายเดือนก่อน +1

    when I tried to play the game with the entire script, my player just went haywire and started floating and spinning in the air... HOW DO I FIX IT

    • @afriend8961
      @afriend8961 5 หลายเดือนก่อน

      Did you use the up vector (y)? Also, check your movement variable values (start with something low for slow movement and increase after playing around). A pain I always have is that the cube and capsule seem to move with movement not in code. Use the vector constraints (in Rigidbody) to fix this too. =).

  • @2meat332
    @2meat332 ปีที่แล้ว

    how do i normalize the movement so the character doesnt move faster diagonally