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
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
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
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!
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"
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 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!
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 :)
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?
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/
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.
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.
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!
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.
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.
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"
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.
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
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
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.
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?
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 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
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
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!
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??
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
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 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 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!
@@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
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
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.
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.....
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?
This guys is the worst, he didn't even pronounce "al-bee-do" correctly. What a joke.
10/10 I subscribed and liked.
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
@GUSTAVO COSTA PEREIRA Maybe you misspelled it since you did type Imput instead of input
can anyone help me at 6:50 it says mov();" " but i do not know what to put in the parentheses
I thought it was albedo like Alfredo but with different consonants
@GUSTAVO COSTA PEREIRA Its "Input" not "Imput"....
kind of underrated really helpful keep up the good work man
Really hope you keep the ball rolling with these tutorials man...😎
lol
Bruh
Love the intro!
Another Stella vid
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
You got this!
last time i was this early, unity couldn't handle rolling a ball
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
Thanks! Appreciate you 🙏
Man, You are a career builder!!!
Just rolled the ball and now looking forward to rolling more stuff.
im gonna roll a fucking cube
Patiently waiting for "How to make a 3d mmo in 5 minutes"
Let me whip that up
Ball rolling character controllers are so fun
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!
Yo thanks friend, stick with me and your brain will become sharp and pointy 💗
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"
Thank you, recently started learning Unity and C# and wanted to make a game like Ballance from my childhood.
Lets goo, I wanna see your game when you get going on it
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!
Lets gooo - if you post it in the Discord I'd love to check it out when you're done!
I love rolling balls
Same
That's what she said.
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!!!!
bruh adhd does not do that.
I have adhd.
Ig adhd effects others differently
@@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!
@@aggie9707 are you hyper active?
@@dcmax2160 yeah
I love this. Thank you so much for making this, it's really helping me learn unity!
I was going to create that kind of Monkey Ball type of game as my first project! And this tutorial was amazing!
Great balls of fire! Nice tutorial!
🔥🔥
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
Yo I heard your calls to the universe
@@BMoDev dude, I ended up using AddTorque instead and it’s so cursed
Hahah yeah I noticed that too when making this... cursed games are right up my alley tho
@@BMoDev trying to use add torque in 2d for character movement is cursed also, gave up and just usede add force lmao
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
Great Tutor ever 👍❤️
Can you make another part for jumping ball when press button or collide with bouncy object
With little squishy animation pls 🥺
I can try haha
This was a great, fast tutorial. But, Mine's not moving (unity 3). I've tried all the keys and mouse combinations.
really great tutorial! i just wish you would've gone more in-depth with the explanations
Cracking vid! More please
Actually brilliant, subscribed, you're awesome.
Appreciate ya
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 :)
0:30 deserves a like :)
what do you put inside the literal at the end?
this was so simple for me myn dream is to make games and people like you can help keep up the good work
6:47 what's that red thing you added.
Choppy camera and movespeed is pointless when the ball just continuously adds more speed as you're moving.
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?
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/
Thank you. Very clear expression
happy to hear it, appreciate ya 🙏
You could have added Time.DeltaTime to the movement script as it would help !
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.
Amazing tutorial
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.
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!
Do you have a video for throwing a ball into the basket?
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.
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.
How would you make it so you can move the camera around?
i need to know that to, do you maeby know it now?
Better than brakley
La verdar no se ingles pero explicas tan bien que te entiendo siendo que hablas otro idioma, muchas gracias por compartir tu conocimiento 😊
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"
Never mind, i found a work around.
@@protokoffing3078 Same shit
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.
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.
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
Yeah it can definitely be a pain
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
lol, what a great intro
3:40 time stamp
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.
How do you do the yellow function in ball control. What are the keys? 3:46 @BMo
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.
got a copy paste for that code?
please help me I done every thing the ball doesn't move whyyy
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?
You must become more subs
I agree
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
You have a typo in your code, can you paste your script so i can see?
@@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
Thanks for the video it is very useful
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
Bro I have a question, that u didnt use the keyboard input to use keyboard functions
Not sure what you mean?
@@BMoDev to accept the input from user u need to add keyboard input to interact with the game character
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!
make it so that it only works when it collides with the ground
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??
I have a question can you do rotation of the camera in ball?
help the thing says "; expected" and also "Empty character literal"
I can now say with all confidence that I know how to roll a ball
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
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?
You need colliders on your gameobjects!
okay but how do you make an isgrounded for a ball?
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?
Hmm if no collisions are detected try adding a rigidbody2d to the goal
@@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.
@@zeldhead can you send your script? Make sure your using Collider2D and Rigidbody2D and your functions have 2D as well
@@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!
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
My Hero
Hi, Thanks for video. How do we convert it to mobile control?
What keys to control the ball? You say now you can roll the ball but not the input
Wasd / arrow keys
error CS1011:Empty character literal
please help me
Thats a syntax error, you have a typo in your code. Can you share your script here or in the discord?
@@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
i got an error that said scene does not contain a definition for build index
thanksss dude
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
im having the same problem i cant find rb or Rigidbody to show up in my script
Please can you give the code into the description
I am really new to this but I am trying to add jumping and ive hit a dead end. Anyone know?
I've write exactly like you do, but I've a CS1003 error Exept ',' I just dont know where is the problem.
Double click the error. You have a comma somewhere
why when I try to open the script give me a lot of errors ?
When I try to open PlayerController my laptop says i cant download this or something
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.
sorry for being late but the keys are wasd or arrow keys
i cant drag the material on the ball
does anyone have a working script of it its not working for me in the "making the ball roll part"
Wow!
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.....
make sure to finish setup in visual studio (it should say it on the side) and also save your code
I write the same script but it's doesn't work.
How to make the ball and camera turn?
how did u actually move the ball as in which keys? I wrote the same script but it didn't work.
wasd
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?
the name of the script has to be the same as is is INSIDE the script
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))
}
}
}
The Rb field won't appear in my Player Controller script, even after putting it into the code exactly like you did. Any tips?
Make sure its public, if its not showing you may have compiler errors, anything in the console?
@@BMoDev Many, mostly ones saying that rigedbody couldn't be found.
@@BasicAxolotl540 i know that i am way too late but save your code
Thx Soo Much!!!
You bet!
ima quit unity ive been trying for a week and i still cant roll a ball every tutorial i try dosent work
You have a typo in your code... can you paste your script, i can tell you where
What editor are you using unfortunately my unity is only using notepad
Download visual studio
lookAt dosent work for me in the unity 2020 verison or 2021 verison
How to make it smooth
the script doesn't give me any errors but the ball doesn't move. And yes the script is on the ball
it automatically goes to notepad and doesent work how do i use a real scripiting thing
You have visual studio installed?