Make an Easy 3D Game, Roll a Damn Ball in Unity

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 232

  • @BMoDev
    @BMoDev  3 роки тому +80

    This guys is the worst, he didn't even pronounce "al-bee-do" correctly. What a joke.
    10/10 I subscribed and liked.

    • @tomashusarik8207
      @tomashusarik8207 3 роки тому +1

      hey i was wondering could you make a video where you show us how to code a movment script 2d or 3d where i can understand whats happening and how the movment work.not just copying someones script and not knowing how it works.Thanks

    • @-petrichor-7263
      @-petrichor-7263 3 роки тому +1

      @GUSTAVO COSTA PEREIRA Maybe you misspelled it since you did type Imput instead of input

    • @dwwww-j6k
      @dwwww-j6k 3 роки тому +2

      can anyone help me at 6:50 it says mov();" " but i do not know what to put in the parentheses

    • @JacobKinsley
      @JacobKinsley 3 роки тому

      I thought it was albedo like Alfredo but with different consonants

    • @StoryCritic
      @StoryCritic 3 роки тому

      @GUSTAVO COSTA PEREIRA Its "Input" not "Imput"....

  • @mr_misser699
    @mr_misser699 3 роки тому +10

    kind of underrated really helpful keep up the good work man

  • @deadbroadcastpc
    @deadbroadcastpc 3 роки тому +31

    Really hope you keep the ball rolling with these tutorials man...😎

  • @eileeng2492
    @eileeng2492 3 роки тому +7

    Love the intro!
    Another Stella vid

  • @mays162
    @mays162 2 роки тому +5

    Ah thanks Unity looked really overwhelming so I thought I would look up a UA-cam video this is the first thing i made on uinty and now I am a lot more motivated to make more

    • @BMoDev
      @BMoDev  2 роки тому +1

      You got this!

  • @bobateacalligraphy9821
    @bobateacalligraphy9821 3 роки тому +15

    last time i was this early, unity couldn't handle rolling a ball

  • @05555book
    @05555book 3 роки тому +3

    Wow man, where have you been since then?
    The first time I find someone who explains everything I want smoothly and without stretching to gain time
    Subscribe
    Like
    you deserve

    • @BMoDev
      @BMoDev  3 роки тому +2

      Thanks! Appreciate you 🙏

  • @StoryCritic
    @StoryCritic 3 роки тому +6

    Man, You are a career builder!!!
    Just rolled the ball and now looking forward to rolling more stuff.

    • @frosty7652
      @frosty7652 2 роки тому +1

      im gonna roll a fucking cube

  • @revmatch6r
    @revmatch6r 3 роки тому +23

    Patiently waiting for "How to make a 3d mmo in 5 minutes"

    • @BMoDev
      @BMoDev  3 роки тому +1

      Let me whip that up

  • @Xizilqou
    @Xizilqou 2 роки тому +1

    Ball rolling character controllers are so fun

  • @marshall123x
    @marshall123x 3 роки тому +2

    OMG, THANK YOU FOR THIS! Seriously, ive been trying to learn unity through unity learn for the last few months and i keep running into dead tutorials that are in desperate need of updating. One of them is similar to your video but it completely dead ends because the version of unity in the tutorial is waay out dated and the person is using code that just doesn't work anymore so for a smooth brain like me to try and figure it was madness. You've earned my sub and ill be waiting for new videos man. Please keep up the good work!

    • @BMoDev
      @BMoDev  3 роки тому +4

      Yo thanks friend, stick with me and your brain will become sharp and pointy 💗

  • @yiyihe2497
    @yiyihe2497 Рік тому +2

    hi, i have encountered an error during this tutorial, im afraid i might have missed something. its literally this line of code, and the ' ' is the problem
    private void FixedUpdate()
    {
    Move(); '';
    }
    the error is "Empty Character Literal"

  • @davidchaikovsky3625
    @davidchaikovsky3625 3 роки тому +1

    Thank you, recently started learning Unity and C# and wanted to make a game like Ballance from my childhood.

    • @BMoDev
      @BMoDev  3 роки тому +1

      Lets goo, I wanna see your game when you get going on it

  • @sequoiakanies2202
    @sequoiakanies2202 3 роки тому +3

    Thank you for the quick, informative and quite useful tutorial. I'm building a simple clone of a game and this was a great video to get me started!

    • @BMoDev
      @BMoDev  3 роки тому +1

      Lets gooo - if you post it in the Discord I'd love to check it out when you're done!

  • @imyellowteeth4691
    @imyellowteeth4691 3 роки тому +11

    I love rolling balls

    • @BMoDev
      @BMoDev  3 роки тому +6

      Same

    • @kunj5327
      @kunj5327 3 роки тому

      That's what she said.

  • @aggie9707
    @aggie9707 2 роки тому +6

    I have strong ADHD so learning unity has been so difficult, i've gone through almost a year of not even being able to get a ball to roll. your short and simple explinations have saved me so much time and frustration! Thank you so much!!!!

    • @dcmax2160
      @dcmax2160 Рік тому

      bruh adhd does not do that.
      I have adhd.
      Ig adhd effects others differently

    • @aggie9707
      @aggie9707 Рік тому

      @@dcmax2160 yeah it’s definitely different for everyone, it’s a spectrum. I’m legally disabled and can’t get a job or drive cause of it. The more you know!

    • @dcmax2160
      @dcmax2160 Рік тому

      @@aggie9707 are you hyper active?

    • @aggie9707
      @aggie9707 Рік тому

      @@dcmax2160 yeah

  • @jaynotsus510
    @jaynotsus510 3 роки тому +2

    I love this. Thank you so much for making this, it's really helping me learn unity!

  • @nikke5186
    @nikke5186 2 роки тому +1

    I was going to create that kind of Monkey Ball type of game as my first project! And this tutorial was amazing!

  • @jimmyljr95
    @jimmyljr95 3 роки тому +4

    Great balls of fire! Nice tutorial!

  • @themusicalhoodie7248
    @themusicalhoodie7248 3 роки тому

    Literally tried to do this a few weeks ago, why didn’t this come sooner.
    In all honesty this is great, thank you so much

    • @BMoDev
      @BMoDev  3 роки тому +2

      Yo I heard your calls to the universe

    • @themusicalhoodie7248
      @themusicalhoodie7248 3 роки тому

      @@BMoDev dude, I ended up using AddTorque instead and it’s so cursed

    • @BMoDev
      @BMoDev  3 роки тому +1

      Hahah yeah I noticed that too when making this... cursed games are right up my alley tho

    • @kursed_exe5594
      @kursed_exe5594 3 роки тому

      @@BMoDev trying to use add torque in 2d for character movement is cursed also, gave up and just usede add force lmao

  • @mysa007krk9
    @mysa007krk9 2 роки тому +1

    I have a problem with my visual studio, it's strange because it doesn't detect my commands and all the code doesn't work PLEASE
    HELP

  • @macaaris1018
    @macaaris1018 3 роки тому +7

    Great Tutor ever 👍❤️
    Can you make another part for jumping ball when press button or collide with bouncy object
    With little squishy animation pls 🥺

    • @BMoDev
      @BMoDev  3 роки тому +2

      I can try haha

  • @sasoritaiga
    @sasoritaiga 2 роки тому +1

    This was a great, fast tutorial. But, Mine's not moving (unity 3). I've tried all the keys and mouse combinations.

  • @ArenSpace
    @ArenSpace 3 роки тому +3

    really great tutorial! i just wish you would've gone more in-depth with the explanations

  • @Soundy777
    @Soundy777 3 роки тому +2

    Cracking vid! More please

  • @space9kris
    @space9kris 3 роки тому +1

    Actually brilliant, subscribed, you're awesome.

    • @BMoDev
      @BMoDev  3 роки тому +1

      Appreciate ya

  • @SeanMurrellRTS
    @SeanMurrellRTS 3 роки тому +1

    Remember to save your script. Thank me later! BTW thanks for this tutorial I'm going with the example so far except the fancy textures. I just want to get my stuff to start rolling. Just what I needed to get the ball moving :)

  • @TimPatDuDe
    @TimPatDuDe 2 роки тому

    0:30 deserves a like :)

  • @bigchungus5610
    @bigchungus5610 3 роки тому +2

    what do you put inside the literal at the end?

  • @Djistheman-se5gf
    @Djistheman-se5gf 3 роки тому

    this was so simple for me myn dream is to make games and people like you can help keep up the good work

  • @underpayedclown
    @underpayedclown 3 роки тому +1

    6:47 what's that red thing you added.

  • @TheMeanArena
    @TheMeanArena Рік тому

    Choppy camera and movespeed is pointless when the ball just continuously adds more speed as you're moving.

  • @BanCorporateOwnedHouses
    @BanCorporateOwnedHouses 3 роки тому +3

    Hey Bmo, how would you suggest going about making the ball roll in regards to camera direction? Would I have it add force based on the forward of the camera * the xInput?

    • @BMoDev
      @BMoDev  3 роки тому

      Unity offers like Transform.forward that I think can be used. You have the right idea though to use the Camera position
      forum.unity.com/threads/solved-moving-object-in-the-direction-of-camera-view.30330/

  • @Balakademi
    @Balakademi 3 роки тому +1

    Thank you. Very clear expression

    • @BMoDev
      @BMoDev  3 роки тому +1

      happy to hear it, appreciate ya 🙏

  • @CODWarzoneMoments
    @CODWarzoneMoments Рік тому

    You could have added Time.DeltaTime to the movement script as it would help !

  • @ra3diantart651
    @ra3diantart651 2 роки тому +1

    I'm so sad, I was able to get the ball to move, but when I got to the camera controller bit, the script wouldn't work, it kept mentioning a composite error. Double checked all spelling, even deleted the code and recreated it, deleted the camera and put in a new one. Nothing would work, and then the ball stopped rolling lol I have no idea what I did, probably have to just start completely over from scratch.

  • @unbelievablybelivible8979
    @unbelievablybelivible8979 2 роки тому

    Amazing tutorial

  • @disknee6630
    @disknee6630 3 роки тому

    Hey uh, I have a request if you are open to do this. Basically, there's this old game that I loved, and I want to recreate the gameplay it has. Could you possibly, maybe, make a short simple video of how to do it? Simply put, you are a ball that can change colors, and any buildings/models the ball touches, it changes the entire color of that model. If you want to actually do this then the game is called De Blob (1 or 2), if you want to see what I'm talking about.

    • @BMoDev
      @BMoDev  3 роки тому

      Thats not too hard to do from this, I could make a video, but basically similar to how the goal in this video works, you want to swap out the material on the player to whatever material is on the object. Shouldn't be too hard!

  • @erdii726
    @erdii726 2 роки тому

    Do you have a video for throwing a ball into the basket?

  • @AkameGaKill194
    @AkameGaKill194 3 роки тому +1

    Ok video. but would be nice if you included talking about closing things off with semi colons and these "{, }" . So because these weren't explained before hand and you went quite fast and a lot of key elements were actually missed out, in your explanation, it was not easy. And I had to go on to forums to ask what was wrong with the script.

    • @AkameGaKill194
      @AkameGaKill194 3 роки тому +1

      Bro, each section you did I had to go on to a different tutorial to try to complete your tutorial. Most of what you did and showed was not easy. And there was a lot missing. The title is very misleading. As a beginner learning coding, my lesson to you if you are trying to teach people who are beginners and have no idea how to code and want to follow your tutorial make sure you include everything. Because I had to go on stacksOver flow and unity forum help page to figure out what to do. And some corrected the code you showed. So please before you make videos, please make sure : 1) the code you run actually is correct. 2) that you explain what you are doing and why. 3) do not label a video as "easy" because this video was nowhere near easy.

  • @joetify4747
    @joetify4747 3 роки тому +4

    How would you make it so you can move the camera around?

    • @nlgames1691
      @nlgames1691 2 роки тому

      i need to know that to, do you maeby know it now?

  • @parthhalkara2490
    @parthhalkara2490 3 роки тому +2

    Better than brakley

  • @maryurymenjivar9120
    @maryurymenjivar9120 2 роки тому +1

    La verdar no se ingles pero explicas tan bien que te entiendo siendo que hablas otro idioma, muchas gracias por compartir tu conocimiento 😊

  • @protokoffing3078
    @protokoffing3078 2 роки тому +1

    im having an issue with the player controller section move the move the ball part. I cant attach the C# file to the sphere, it says "Can;t add script component 'PlayerController' because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match"

    • @protokoffing3078
      @protokoffing3078 2 роки тому

      Never mind, i found a work around.

    • @foopock
      @foopock 2 роки тому

      @@protokoffing3078 Same shit

  • @Allplussomeminus
    @Allplussomeminus 3 роки тому

    You made this way faster than the official Unity lesson. As it should be for seasoned users.
    Edit: ohhhhh, but you're using the outdated input method.

    • @BMoDev
      @BMoDev  3 роки тому

      Yeah, but its still useful to know as thats how Unity handled it for a decade. Adapting this to the new input system would be great thing to try on your own! It wont be hard to setup.

  • @JacobKinsley
    @JacobKinsley 3 роки тому

    I hate how dragging things over the hierarchy on unity doesn't always select it properly unless you're on a really specific part of it, somehow it's easier to manage if you just drag it to the viewport

    • @BMoDev
      @BMoDev  3 роки тому

      Yeah it can definitely be a pain

  • @blueslime5457
    @blueslime5457 3 роки тому +1

    I did what you asked in the code but the code program I’m using is notepad and it says when click on script always use note pad how do I take that off to put visual studios
    Pls help

  • @emaipoba4795
    @emaipoba4795 2 роки тому

    lol, what a great intro

  • @blueslime5457
    @blueslime5457 3 роки тому +1

    3:40 time stamp

  • @tomago8482
    @tomago8482 2 роки тому

    I have a question. How do you make the ball spin more in response to movement? The ball looks unnaturally slow and yet it can move fast.

  • @T_xb
    @T_xb Рік тому

    How do you do the yellow function in ball control. What are the keys? 3:46 @BMo

  • @bartvandalen3045
    @bartvandalen3045 3 роки тому +1

    Can anybody tell me how to get the Input to work? I already installed the InputSystem, regenerated the project files, but still nothing like in the video.
    You have to redo the project files or something like that in the project preferences menu.

  • @humanuserperson6082
    @humanuserperson6082 3 роки тому +1

    got a copy paste for that code?

  • @omarrxd1
    @omarrxd1 2 роки тому +1

    please help me I done every thing the ball doesn't move whyyy

  • @chiewcck
    @chiewcck 3 роки тому

    What if I want to roll the ball toward not backward? example, the ball roll x-left & right. y-jump, z-forward only. What is the C#scripts write up? Can you help?

  • @dfgesfg
    @dfgesfg 3 роки тому +2

    You must become more subs

  • @AVVCool
    @AVVCool 2 роки тому

    AHH, why isn't this working like the part where we had to change the script took so long for me and now when I enter play mode it says "all the compiler errors must be fixed to enter playmode!" so GREAT I can't test the game out

    • @BMoDev
      @BMoDev  2 роки тому

      You have a typo in your code, can you paste your script so i can see?

    • @AVVCool
      @AVVCool 2 роки тому

      @@BMoDev yeah sorry umm I didn't know you replied to me on that day and that was 3 days ago but it's ok I deleted that game anyways and moved on to making a first-person shooter game

  • @GayathriVeeraraghavan
    @GayathriVeeraraghavan Рік тому

    Thanks for the video it is very useful

  • @Alibyss
    @Alibyss Рік тому

    I know this is an older video and all, but I can't manage to get the Rb field to appear under Player Controller. And I don't know if something is going wrong or if it's just that Unity has changed since the video got uploaded

  • @moazamsmachines
    @moazamsmachines 3 роки тому +1

    Bro I have a question, that u didnt use the keyboard input to use keyboard functions

    • @BMoDev
      @BMoDev  2 роки тому +1

      Not sure what you mean?

    • @moazamsmachines
      @moazamsmachines 2 роки тому +1

      @@BMoDev to accept the input from user u need to add keyboard input to interact with the game character

  • @marshall123x
    @marshall123x 3 роки тому

    Any chance you could post the code on how to get the ball to jump properly? Ive gotten mine to jump however, if you tap the jump button multiple times, the space bar in my case, it allows the player to basically rise indefinitely. If you have any tips on that i would really appreciate it!

    • @nlgames1691
      @nlgames1691 2 роки тому

      make it so that it only works when it collides with the ground

  • @MrGreenBeanBeenBeanin
    @MrGreenBeanBeenBeanin 3 роки тому

    Imagine watching a tutorial for rolling balls, sus. But how would you put mobile controls onto it or is it already touch screen compatible once you switch builds??

  • @kyriegarcia9250
    @kyriegarcia9250 3 роки тому

    I have a question can you do rotation of the camera in ball?

  • @thatdogewithvr
    @thatdogewithvr 2 роки тому

    help the thing says "; expected" and also "Empty character literal"

  • @Raezoasr
    @Raezoasr 2 роки тому

    I can now say with all confidence that I know how to roll a ball

  • @nuggetnugget8552
    @nuggetnugget8552 3 роки тому +1

    WHY... CANT... NUGGET... DRAG... THE CODE... ONTO... THE BALL!?!?
    Never mind. Nugget has used the power of the talismans to put the code on nugget's ball

  • @Basgo1official
    @Basgo1official 2 роки тому

    Hey nice tutorial thanks you. I would like to know how you do to avoid the ball to go throught the plane when you active gravity on ball?

    • @BMoDev
      @BMoDev  2 роки тому

      You need colliders on your gameobjects!

  • @tam_69420
    @tam_69420 Рік тому

    okay but how do you make an isgrounded for a ball?

  • @zeldhead
    @zeldhead 2 роки тому +1

    Great video tutorial. I had one problem though: I just can't get the Goal & New Level to work. No matter what I've tried, my player object doesn't seem to trigger the advance. Initially, whenever Is Trigger was checked, my player object would pass through. I made the box collider with the trigger on the outside of another box collider, hoping the internal one would recognize my player object, but no luck. Any thoughts?

    • @BMoDev
      @BMoDev  2 роки тому +2

      Hmm if no collisions are detected try adding a rigidbody2d to the goal

    • @zeldhead
      @zeldhead 2 роки тому

      @@BMoDev thanks for the reply. Yeah...I thought about that and tried that too, to no avail. I wonder if I'm just not referencing the player object in the score script in a way that is being recognized. I should say that I'm doing this a 2d game...not a 3d one.

    • @BMoDev
      @BMoDev  2 роки тому +1

      @@zeldhead can you send your script? Make sure your using Collider2D and Rigidbody2D and your functions have 2D as well

    • @zeldhead
      @zeldhead 2 роки тому +1

      ​@@BMoDev That was exactly the problem! I was calling OnTriggerEnter and not OnTriggerEnter2D and referencing Collider not Collider 2D. 🤦‍♂ Thanks! It totally works now. And thanks for all of the great content. Subscribed and looking forward to digging through more videos!

  • @StickManOffical
    @StickManOffical Рік тому

    Hey question what I open the c# script it’s say open in apps like notepad and stuff but notepad won’t help can someone help

  • @MisterDiesel
    @MisterDiesel 2 роки тому

    My Hero

  • @hasansagcolak
    @hasansagcolak Рік тому

    Hi, Thanks for video. How do we convert it to mobile control?

  • @myfatherisdoingverywellhbu
    @myfatherisdoingverywellhbu 2 роки тому

    What keys to control the ball? You say now you can roll the ball but not the input

    • @BMoDev
      @BMoDev  2 роки тому

      Wasd / arrow keys

  • @099-lrds-csm5
    @099-lrds-csm5 3 роки тому +2

    error CS1011:Empty character literal
    please help me

    • @BMoDev
      @BMoDev  3 роки тому

      Thats a syntax error, you have a typo in your code. Can you share your script here or in the discord?

    • @starcrusaders
      @starcrusaders 3 роки тому

      @@BMoDev using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      public class PlayerController : MonoBehaviour
      {
      public Rigidbody rb;
      public float moveSpeed = 10f;
      private float xInput;
      private float yInput;
      // Start is called before the first frame update
      void Awake()
      {
      rb = GetComponent();
      }
      // Update is called once per frame
      void Update()
      {
      // Good for handling inputs and animations
      ProcessInputs();
      }
      private void FixedUpdate()
      {
      //Movement
      Move();''
      }
      private void ProcessInputs()
      {
      xInput = Input.GetAxis("Horizontal");
      zInput = Input.GetAxis("Vertical");
      }
      private void Move()
      {
      rb.AddForce(new Vector3(xInput, 0f, zInput) * moveSpeed);
      }
      }
      this is what i have and it comes with the same error

  • @thevincento890
    @thevincento890 3 роки тому

    i got an error that said scene does not contain a definition for build index

  • @greatgadgetseasierlife733
    @greatgadgetseasierlife733 2 роки тому

    thanksss dude

  • @zachariusd6473
    @zachariusd6473 2 роки тому

    Ok, but, like, where is the assets folder!? And how am I supposed to find stuff, your setup is all wonky compared to mine. And when I try to drag the script to the ball, it says "Can't add script component 'PlayerController' because the script class can not be found. Make sure there are no compile errors and that the file name and class name match." How am I supposed to fix this? And no, the script doesn't show rb under player controller

    • @kratoids
      @kratoids 2 роки тому

      im having the same problem i cant find rb or Rigidbody to show up in my script

  • @vgfvtf6167
    @vgfvtf6167 3 роки тому

    Please can you give the code into the description

  • @maxdamiecki1935
    @maxdamiecki1935 3 роки тому

    I am really new to this but I am trying to add jumping and ive hit a dead end. Anyone know?

  • @Retro-Nico
    @Retro-Nico 2 роки тому

    I've write exactly like you do, but I've a CS1003 error Exept ',' I just dont know where is the problem.

    • @BMoDev
      @BMoDev  2 роки тому

      Double click the error. You have a comma somewhere

  • @jixnka9696
    @jixnka9696 2 роки тому

    why when I try to open the script give me a lot of errors ?

  • @wesselvankoeverden9842
    @wesselvankoeverden9842 3 роки тому

    When I try to open PlayerController my laptop says i cant download this or something

  • @sasoritaiga
    @sasoritaiga 2 роки тому

    I decided to try this from scratch again, and the ball still doesn't roll. I've followed the first script exactly, with the exception of fixing the Move();'' typo that the OP didn't fix (in the video). Also, maybe it was too fast, but the OP also didn't change the variable declaration from yInput to zInput. (jumping around and changing things mid example and then saying, 'it doesn't really matter' isn't exactly helpful.
    Anyway, right after adding:
    private void FixedUpdate()
    {
    //movement
    Move(); // removed '' after semicolon
    }
    the OP immediately cuts to the ball rolling around, just before 7:00. However, he doesn't say which keys or input device works with xInput, zInput. He just says that 'the ball now rolls around'... using what?
    As such, it doesn't work on my end.

    • @thatdogewithvr
      @thatdogewithvr 2 роки тому +1

      sorry for being late but the keys are wasd or arrow keys

  • @Frogzilla1289
    @Frogzilla1289 Рік тому

    i cant drag the material on the ball

  • @SwivetZip
    @SwivetZip 3 роки тому

    does anyone have a working script of it its not working for me in the "making the ball roll part"

  • @DmytroPlekhotkin
    @DmytroPlekhotkin 2 роки тому

    Wow!

  • @cheryllockhart6195
    @cheryllockhart6195 2 роки тому

    So now it goes to Visual Studio when I do the C# thing.... automatically (Unity says its now packaged with it and defaults to it.... WTH).... I tried typing the first script in, the ball doesn't show rigidbody in the inspector. (I also don't know how to make the letters green where yours are green.... does that matter???) I don't know if what I put in the Visual Studio script goes right back into the GameObject or if I have to save something to do that... totally lost now... just want to make the damn ball roll.....

    • @thatdogewithvr
      @thatdogewithvr 2 роки тому

      make sure to finish setup in visual studio (it should say it on the side) and also save your code

  • @amirhussainbalti
    @amirhussainbalti 3 роки тому

    I write the same script but it's doesn't work.

  • @feykrosil1676
    @feykrosil1676 3 роки тому

    How to make the ball and camera turn?

  • @sausthabbirsinghtuladhar1729
    @sausthabbirsinghtuladhar1729 2 роки тому

    how did u actually move the ball as in which keys? I wrote the same script but it didn't work.

  • @derfser543
    @derfser543 2 роки тому

    Hi! I get a problem everytime i try to drag the Script CameraController into the Camera. It says the script class cant be found. I am using the version 2019.4.18f1. Can you help me pls?

    • @nlgames1691
      @nlgames1691 2 роки тому

      the name of the script has to be the same as is is INSIDE the script

  • @Ventruxbrudi
    @Ventruxbrudi 2 роки тому +2

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class NewBehaviourScript : MonoBehaviour
    {
    public Rigidbody rb;
    public float moveSpeed = 10f;
    Privat float xInput;
    privat float yInput;
    // Start is called before the first frame update
    void awake()
    {
    rb = GetComponent();
    }
    // Update is called once per frame
    void Update()
    {
    Processinputs();
    }
    void Fixedupdate()
    {
    //Movement
    Move();
    }
    privat void processinputs()
    {
    xInput = Input.GetAxis("Horizontal")
    zInput = Input.GetAxis("Vertical")
    }
    privat void move()
    {
    rb.AddForce(new Vector3(xInput, 0f, zInput * movespeed))
    }

    }
    }

  • @BasicAxolotl540
    @BasicAxolotl540 2 роки тому

    The Rb field won't appear in my Player Controller script, even after putting it into the code exactly like you did. Any tips?

    • @BMoDev
      @BMoDev  2 роки тому

      Make sure its public, if its not showing you may have compiler errors, anything in the console?

    • @BasicAxolotl540
      @BasicAxolotl540 2 роки тому

      @@BMoDev Many, mostly ones saying that rigedbody couldn't be found.

    • @thatdogewithvr
      @thatdogewithvr 2 роки тому

      @@BasicAxolotl540 i know that i am way too late but save your code

  • @Anitolen
    @Anitolen 3 роки тому

    Thx Soo Much!!!

  • @autumnburch7656
    @autumnburch7656 2 роки тому +1

    ima quit unity ive been trying for a week and i still cant roll a ball every tutorial i try dosent work

    • @BMoDev
      @BMoDev  2 роки тому

      You have a typo in your code... can you paste your script, i can tell you where

  • @doggoofweird2585
    @doggoofweird2585 3 роки тому

    What editor are you using unfortunately my unity is only using notepad

  • @leytonslife3628
    @leytonslife3628 3 роки тому

    lookAt dosent work for me in the unity 2020 verison or 2021 verison

  • @3DArtisian
    @3DArtisian 10 місяців тому

    How to make it smooth

  • @Gabriel_-_-_
    @Gabriel_-_-_ Рік тому

    the script doesn't give me any errors but the ball doesn't move. And yes the script is on the ball

  • @UltraMonkey1
    @UltraMonkey1 2 роки тому

    it automatically goes to notepad and doesent work how do i use a real scripiting thing