where we run controller.Move(dir * moveSpeed * Time.deltaTime); change the dir to dir.normalized to stop the character walking faster in diagonal directions Also in the AimStateManager class I assumed the xAxis and yAxis.Update(Time.deltaTime) would be frame rate independent, this is not the case… To fix this simply change these variables to floats which can be private and also add a [SerializeField] float mouseSense; In the Update function replace the xAxis and yAxis.Update code with xAxis +=(Input.GetAxisRaw(“Mouse X”) * mouseSense); yAxis -=(Input.GetAxisRaw(“Mouse Y”) * mouseSense); yAxis = Mathf.Clamp(yAxis,-80,80) The rest of the code will stay the same
When I tried to change xAxis and yAxis in the update, I was told that I couldn't convert Cinemachine. AxisState to float because I was new to it and didn't quite understand it
@@dantie7186 drive.google.com/file/d/1C2LoLNtjQWVlKYYnEhN7RT9QSTvQRNjH/view Here is the project files for Ep 5 also in the second episode I show where I change the axis states to floats discord.gg/FGnPBHHQsZ here’s my discord if u need any help still
Honestly mate I've been trying to get my own movement script and follow cam set up for like week now (I only started Unity 3 weeks ago and completely new to scripting) I've watched loaaads of youtube tuts and its either been too confusing or somethings messed up, whatever but this is literally the first video that I've been able to follow start to finish and actually understood what I've done by the end of it. Big thank you for these videos, subbed my guy.
turn on the bell new videos coming soon, also I will be dropping the custom wheel collider and car controller asset for free and at some point will be adding cars to the project
Thank you, episode 5 will be out later today and a lot of people seem to be enjoying it so I will be continuing to add things like enemy AI and a full gameplay loop by the end.
8:00 Just want to add, I've heard it's not good practice to have multiple CharacterController.Move calls in a single update loop as it could potentially cause some instability issues (plus it's really easy to fix). So my solution is to remove the move call from GetDirectionAndMove and Gravity, the in the Update loop after both those methods are called, create a Vector3 finalMove which is the sum of dir * moveSpeed and velocity, then call controller.Move(finalMove * Time.deltaTime)
I will cover jumping in the third video but if all you want is a simple character controller simply add a variable for jumpForce and in the update you can paste this code: if(IsGrounded()&&Input.getKeyDown(KeyCode.Space)) velocity.y += jumpForce;
im getting the error ArgumentException: Input Axis vertical is not setup and also the error:NullreferenceException: object reference not set to an instance of an object movementstatemanager.OnDrawGizmos() how do you fix these?? also this is for the movementstatemanager script
Do you have an updated AimStateManager Script for newer Cinemachine updates? I've been loving this tutorial but running into some issues particularly with the Axis. I put in the script you have (With changes "using Unity.Cinemachine;" instead of "using Cinemachine;) but AxisState is deprecated. I tried changing AxisState to InputAxis and get some errors I cant seem to get around. If I try to continue using the script as is, it still runs but when I run the game where you are at 14:08, x axis seems to work fine and the camera follows the mouse left to right but y axis doesnt seem to be registering. no up and down camera movement with all the same scripts as the vid. Are there any updates/fixes for this stuff? Thanks.
Can you help solve this error ? i dont know why but no error with 'Walk' and 'Crouch' and i stuck here. Error: \States\IdleState.cs(16,79): error CS1061: 'MovementStateManager' does not contain a definition for 'Run' and no accessible extension method 'Run' accepting a first argument of type 'MovementStateManager' could be found (are you missing a using directive or an assembly reference?)
Make sure the variable or the RunState Class in the movement state manager is of type MovementBaseState. It seems like you may have it as a MovementStateManager class
Super beginner question but how does he actually make it move was there a separate video for bindings? Is it with a controller or keyboard am lost honestly
So Unity has basic inputs pre set up so the Horizontal and Vertical axis for the keyboard and mouse are there for you to use and change as you wish. hope this answers your question :)
Hi, i followed all the instructions but i think is the new input system. Look when i put everything and go to check i have a problem that says : Cannot modify the return value of 'Transform.position' because it is not a variable Please i need help. :(
I did everything right but for some reason, I can't move my camera around whenever im moving the player but the player does move in the camera forward. How do i fix this
here in this if we want that camera is alwys in d back side of character and follows character when on swipe we change camera angle than character angle must be same as camera...how this possible?
i keep getting the error Assets\MovementStateManager.cs(8,6): error CS0246: The type or namespace name 'hideinspectorAttribute' could not be found (are you missing a using directive or an assembly reference?) what to do?
Crazy beginner question. I'm starting with this video and Googling loads at every step. After creating the Movement State Manager script your screen goes to the place you can type code. What coding program is that?
Whenever I add the ground layer and set the layer mask to it, my capsule still snaps/falls really fast. Has anyone else had this issue? Im on a slightly newer version of unity 2022.3.8
Tell me where I could have messed up, everything works for me, only the inversion on the y axis, when I move the mouse up, the character looks down and vice versa
please help me I keep on getting an error saying that the variable controller for movement state manager has not been assigned. I'm a beginner and I don't know how to solve this on my own and it wont let me play the game until I fix it. Please help!!!
Is there a way to make the character rotate only after the camera reaches a certain angle? Trying to recreate Transformers fall of cybertron controls or like Minecraft 3rd person where your player rotates after a certain point
Bro I'm unable to use Mouse X and Y. I did every step that you did but it dont work. please if you have any idea what i could do pleaaaasee say it to me. thanks
I’m tempted to make a video on how to upgrade this project to the new Input system. But will probably continue the series with the old system due to simplicity
i keep on getting errors that say Assets\MovementStateManager.cs(7,29): error CS1519: Invalid token '=' in class, record, struct, or interface member declaration
i typed in everything that was given to me and i keep getting the same 3 errors. someone please help😭 edit; nvm i was able to get rid of them but got a new one. error cs0103L the name 'controller' does not exist in the current conect when should i do?
Thank you for reminding me I picked Unity back up after a few months break and saw they had a Unity 6 so I upgraded the project and realised the same thing so I will have to make a new video for the cinemachine update
Yes you can in the second episode which is out now I show you how to replace the model with the capsule and get the animations set up. Finally in the third episode I will be showing you how to write the code to change the animations depending if you are running, crouching or walking. If you have any questions feel free to message me on my discord which you can find on my website gadd.games
Hey Gadd, I followed every step of this video exactly but the character doesn't stop moving for a few more seconds even after I took my hands off the controls. Here's the code(If there's something that I did wrong, please tell me!): MovementStateManager.cs using System.Collections; using System.Collections.Generic; using UnityEngine; public class MovementStateManager : MonoBehaviour { public float movespeed = 3; float hzInput, vInput; [HideInInspector] public Vector3 dir; CharacterController controller; [SerializeField] float groundYOffset; [SerializeField] LayerMask groundMask; Vector3 spherePos; [SerializeField] float gravity = -9.81f; Vector3 velocity; void Start() { controller = GetComponent(); } void Update() { GetDirectionAndMove(); Gravity(); } void GetDirectionAndMove() { hzInput = Input.GetAxis("Horizontal"); vInput = Input.GetAxis("Vertical"); dir = transform.forward * vInput + transform.right * hzInput; controller.Move(dir.normalized * movespeed * Time.deltaTime); } bool IsGrounded() { spherePos = new Vector3(transform.position.x, transform.position.y - groundYOffset, transform.position.z); if (Physics.CheckSphere(spherePos, controller.radius - 0.05f, groundMask)) return true; return false; } void Gravity() { if (!IsGrounded()) velocity.y += gravity * Time.deltaTime; else if (velocity.y < 0) velocity.y = -2; controller.Move(velocity * Time.deltaTime); } private void OnDrawGizmos() { Gizmos.color = Color.red; Gizmos.DrawWireSphere(spherePos, controller.radius - 0.05f); } }
You don't even have to make a ground check. The Unity CharacterController has it's build in controller.isGrounded. You can just check that with an if statement and handle the rest of the logic in there.
That was my mums favourite part of the video, in the future I am going to edit it less so I will show that I am no genius and it takes time, effort and persistence. I am still learning and always will be
Yet another tutorial that doesn't work (probably due to Unity's constant annoying updates). It wouldn't let me add a CineMachine Virtual Camera unless I parented it to an object on the hierarchy and it's symbol doesn't appear next to the main camera and it doesn't function. I'm so sick of unity's bullcrap.
@@gaddgames Never Mind, I got it to work! For some reason, if I selected it in the Component Tab from the tab, it would be grayed out and not selectable unless I parented it to an object in the hierarchy, in which case it wouldn't work. However, when I right-clicked the Hierarchy and selected Cinemachine and virtual camera from there, it worked just as you showed. Thank you for your attempted support regardless!
Go to file at the top left of Unity then preferences/ external tools, then select your IDE from the drop down menu then regenerate project files then it should make things easier to follow along with
@@gaddgames I did that now. its not that. there is something wrong with the assemblies not showing up for me for some reason. I had a fix for it but that doesn't seem to be an option for me sadly. do you have a discord?
i got some error that said: nullreferenceException: object reference not set to an instance of an object movementStateManager.OnDrawGizmos can someone help me
NullReferenceException: Object reference not set to an instance of an object MovementStateManagement.OnDrawGizmos () (at Assets/MovementStateManagement.cs:60) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) i have this problem how i can fix
ay man im stuck at 14:00 i cant play bc it automaticly pauses the game and when i try to unpause it gives me an error saying: System.ArgumentException: Input Axis Mouse Y is not setup. can you help me out please?
where we run controller.Move(dir * moveSpeed * Time.deltaTime); change the dir to dir.normalized to stop the character walking faster in diagonal directions
Also in the AimStateManager class I assumed the xAxis and yAxis.Update(Time.deltaTime) would be frame rate independent, this is not the case…
To fix this simply change these variables to floats which can be private and also add a [SerializeField] float mouseSense;
In the Update function replace the xAxis and yAxis.Update code with
xAxis +=(Input.GetAxisRaw(“Mouse X”) * mouseSense);
yAxis -=(Input.GetAxisRaw(“Mouse Y”) * mouseSense);
yAxis = Mathf.Clamp(yAxis,-80,80)
The rest of the code will stay the same
When I tried to change xAxis and yAxis in the update, I was told that I couldn't convert Cinemachine. AxisState to float because I was new to it and didn't quite understand it
If there is project source code, can you package it and send it to me for study? Thank you for a long time
@@dantie7186 drive.google.com/file/d/1C2LoLNtjQWVlKYYnEhN7RT9QSTvQRNjH/view
Here is the project files for Ep 5 also in the second episode I show where I change the axis states to floats
discord.gg/FGnPBHHQsZ here’s my discord if u need any help still
You can use Vector3.ClampMagnitude(dir, 1.0f)
instead of dir.normalized
cuz you will get some weird movement with dir.normalized
@@mrfun3340 thanks mate, this is what im looking for. i was using dir.normalized and it makes my player like walking on the ice
This is the best tutorial i ve ever seen!! Thank you man for this serie!!!
Thank you so much!
Honestly mate I've been trying to get my own movement script and follow cam set up for like week now (I only started Unity 3 weeks ago and completely new to scripting) I've watched loaaads of youtube tuts and its either been too confusing or somethings messed up, whatever but this is literally the first video that I've been able to follow start to finish and actually understood what I've done by the end of it. Big thank you for these videos, subbed my guy.
Much love brother 🤙
These comments keep me going ❤️🔥
This is one of the best and the latest please continue tutorial! Thank you Gadd Games!
Thank you very much the next episode will be out today or tomorrow but was delayed because I was recording the wrong screen 🤦♂️
Better than any tutorials i've seen! You're a legend!
Thank you very much brother I am working on episode 17 as we speak
You the best man explaining every single things
I'm following your tutorial for my open world game ! Excellent job -Thanks for segregation into chapters.
should continue this to another playlist .. very good content thank you , big help !
turn on the bell new videos coming soon, also I will be dropping the custom wheel collider and car controller asset for free and at some point will be adding cars to the project
Really enjoyed this first video, definitely would like this to flesh out into an entire series for a in depth Third Person Shooter Character. Subbed
Thank you, episode 5 will be out later today and a lot of people seem to be enjoying it so I will be continuing to add things like enemy AI and a full gameplay loop by the end.
8:00 Just want to add, I've heard it's not good practice to have multiple CharacterController.Move calls in a single update loop as it could potentially cause some instability issues (plus it's really easy to fix). So my solution is to remove the move call from GetDirectionAndMove and Gravity, the in the Update loop after both those methods are called, create a Vector3 finalMove which is the sum of dir * moveSpeed and velocity, then call controller.Move(finalMove * Time.deltaTime)
I will cover jumping in the third video but if all you want is a simple character controller simply add a variable for jumpForce and in the update you can paste this code:
if(IsGrounded()&&Input.getKeyDown(KeyCode.Space)) velocity.y += jumpForce;
also set the jumpforce to be a serialized variable so yoiu can tweak it in game
Thank you I am just starting
Thanks your tutorials are the best
Thank you 🙏
Hey, Really helpful video. Quick question, how would i disable mouse acceleration? it seems to be activated.
i love this man holy
Incrível esse tutorial, funcionou de primeiro mesmo tendo o básico em inglês foi o melhor tutorial de todos, continue assim, está de parabéns
Merci beaucoup monsieur!
Great tutorial man
im getting the error ArgumentException: Input Axis vertical is not setup and also the error:NullreferenceException: object reference not set to an instance of an object movementstatemanager.OnDrawGizmos() how do you fix these?? also this is for the movementstatemanager script
Do you have an updated AimStateManager Script for newer Cinemachine updates? I've been loving this tutorial but running into some issues particularly with the Axis. I put in the script you have (With changes "using Unity.Cinemachine;" instead of "using Cinemachine;) but AxisState is deprecated. I tried changing AxisState to InputAxis and get some errors I cant seem to get around. If I try to continue using the script as is, it still runs but when I run the game where you are at 14:08, x axis seems to work fine and the camera follows the mouse left to right but y axis doesnt seem to be registering. no up and down camera movement with all the same scripts as the vid. Are there any updates/fixes for this stuff? Thanks.
Outstanding!
Glad you like it!
oh my oh my! a new channel about Unity! Goodie!! thank you for the videos. Subscribe!!
Thank you 🙏
About the MovementStateManager, what software are you using for the scripting because for me it brought me to MS Word
Microsoft Visual Studio
I am using visual studio 2022 currently I believe in this video it was the 2019 version but either will work but id recommend 2022 as it is the latest
The camera part didn't work until I moved the main cam in the camera follow
This guy is so smart
My friends would disagree :D
Can you help solve this error ? i dont know why but no error with 'Walk' and 'Crouch' and i stuck here.
Error:
\States\IdleState.cs(16,79): error CS1061: 'MovementStateManager' does not contain a definition for 'Run' and no accessible extension method 'Run' accepting a first argument of type 'MovementStateManager' could be found (are you missing a using directive or an assembly reference?)
Make sure the variable or the RunState Class in the movement state manager is of type MovementBaseState. It seems like you may have it as a MovementStateManager class
@@gaddgames Omg, it's my fault while coding, i typed "public RunState Rn"
Great job
Thank u
Super beginner question but how does he actually make it move was there a separate video for bindings? Is it with a controller or keyboard am lost honestly
So Unity has basic inputs pre set up so the Horizontal and Vertical axis for the keyboard and mouse are there for you to use and change as you wish. hope this answers your question :)
Thank you so much bro!
Happy to help!
Thanks u, my bro!!!!
Thank you too!
very cool. easy to follow.
Kool TPS Controller Could I use for commercial use?
Sure thing I quit my job yesterday so even more episodes coming soon
What application did you use for the movement state manager? I can't open it because I don't have a compatible app
I use visual studio 2022 at the moment sorry for the late response, keep it up buddy
Thank you!!
Hi, i followed all the instructions but i think is the new input system. Look when i put everything and go to check i have a problem that says : Cannot modify the return value of 'Transform.position' because it is not a variable
Please i need help. :(
You need transform with a lower case t
If I used someone else character controller script then what do I need to change to follow along with your next tutorials?
I did everything right but for some reason, I can't move my camera around whenever im moving the player but the player does move in the camera forward. How do i fix this
Do you still need any help brother?
@@gaddgames guess he doesnt need any help now
I followed your code for the Cinemachine, but it didn't pop up with the menu it did for you?
In the next video the axis states get replaced anyway lol
Bro Great Video thank you so much,
How did you get a deep knowledge of c#, and do you have a Discord?
no matter what ı do it drops so fast what do ı do ?
here in this if we want that camera is alwys in d back side of character and follows character when on swipe we change camera angle than character angle must be same as camera...how this possible?
tip, use GetAxisRaw for a more responsive movement
i keep getting the error Assets\MovementStateManager.cs(8,6): error CS0246: The type or namespace name 'hideinspectorAttribute' could not be found (are you missing a using directive or an assembly reference?) what to do?
nothing is happening when I move my mouse around pls help
Have you fixed this issue yet? If not send me a message on discord
@@gaddgames I ended up with a brackeys video...dunno how but a code line solved it apparently lol
Crazy beginner question. I'm starting with this video and Googling loads at every step. After creating the Movement State Manager script your screen goes to the place you can type code. What coding program is that?
Scratch that, I figured it out from another RUclips video. But I'll keep the comment for the algo, if that helps? Thanks for the content!
@@Trunksxmp Incase anyone else doesn't know its Microsoft visual studio.
Whenever I add the ground layer and set the layer mask to it, my capsule still snaps/falls really fast. Has anyone else had this issue? Im on a slightly newer version of unity 2022.3.8
Tell me where I could have messed up, everything works for me, only the inversion on the y axis, when I move the mouse up, the character looks down and vice versa
can help me fix the issue that when evry time i click play its says compile errors need to be fixed or something anyways great tutorial!
Great tutorial!
Use some compression/limiting for your audio. You are very quiet!
please help me I keep on getting an error saying that the variable controller for movement state manager has not been assigned. I'm a beginner and I don't know how to solve this on my own and it wont let me play the game until I fix it. Please help!!!
my mouse working opposite when i drag up camera faces down and vice versa any solution ??
Make sure you invert the input by putting a - behind where you capture the vertical input from the mouse
the camera always stays in the center of the screen it doesn't follow the player the code is correct i don't know why it doesn't work
Gadd Games are you planning to create your own discord server?
Discord link is somewhere on my RUclips banner
Is there a way to make the character rotate only after the camera reaches a certain angle? Trying to recreate Transformers fall of cybertron controls or like Minecraft 3rd person where your player rotates after a certain point
Anyone know how to controlee the CM virtual camera here with input from actionMap of new input system?
Have you found out how? I'm not sure how to, and I need help.
hide in inspector not visible help me sir
The code doesnt work for me (movement)
look if you did a type
king king u are a king amk !!!!!!
I'm but a mere peasant good sir
Bro I'm unable to use Mouse X and Y. I did every step that you did but it dont work. please if you have any idea what i could do pleaaaasee say it to me. thanks
Watch the second video it gets changed anyway
@@gaddgames thanks mate
cant get the jumping workinng
I am 117th comment...
MISTER CHEF
don't you have tutorial just like this series where you use the new input system?
I’m tempted to make a video on how to upgrade this project to the new Input system. But will probably continue the series with the old system due to simplicity
It tells '*' cannot be used for vector3
In the first script
Does this tutorial work for FPS game?
i keep on getting errors that say Assets\MovementStateManager.cs(7,29): error CS1519: Invalid token '=' in class, record, struct, or interface member declaration
It can be you unity version
@@Thatonegamers11459 oh ok thanks I gave up like a year ago but that could be a good tip
@@Thatonegamers11459 so I’ll try again
@@Davidgotbored 🤣🤣 sorry
i typed in everything that was given to me and i keep getting the same 3 errors. someone please help😭
edit; nvm i was able to get rid of them but got a new one. error cs0103L the name 'controller' does not exist in the current conect
when should i do?
Theres something wrog with my code please help ive reviewed it so many times
me too
create fps multiplayer series tutorial using photon pun 2 and mixamo animations please!
how does one add jumping
By carry on watching the series
Camera script doesn't work with Unity 6 at all, but good tutorial after all.
Thank you for reminding me I picked Unity back up after a few months break and saw they had a Unity 6 so I upgraded the project and realised the same thing so I will have to make a new video for the cinemachine update
hello im becoming an indie developer is it possible to change the model with my own?
Yes you can in the second episode which is out now I show you how to replace the model with the capsule and get the animations set up. Finally in the third episode I will be showing you how to write the code to change the animations depending if you are running, crouching or walking. If you have any questions feel free to message me on my discord which you can find on my website gadd.games
The discord link is in my links page on my website also make sure to read the pinned comments on this video. Thank you for watching!
Hey Gadd, I followed every step of this video exactly but the character doesn't stop moving for a few more seconds even after I took my hands off the controls.
Here's the code(If there's something that I did wrong, please tell me!):
MovementStateManager.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MovementStateManager : MonoBehaviour
{
public float movespeed = 3;
float hzInput, vInput;
[HideInInspector] public Vector3 dir;
CharacterController controller;
[SerializeField] float groundYOffset;
[SerializeField] LayerMask groundMask;
Vector3 spherePos;
[SerializeField] float gravity = -9.81f;
Vector3 velocity;
void Start()
{
controller = GetComponent();
}
void Update()
{
GetDirectionAndMove();
Gravity();
}
void GetDirectionAndMove()
{
hzInput = Input.GetAxis("Horizontal");
vInput = Input.GetAxis("Vertical");
dir = transform.forward * vInput + transform.right * hzInput;
controller.Move(dir.normalized * movespeed * Time.deltaTime);
}
bool IsGrounded()
{
spherePos = new Vector3(transform.position.x, transform.position.y - groundYOffset, transform.position.z);
if (Physics.CheckSphere(spherePos, controller.radius - 0.05f, groundMask)) return true;
return false;
}
void Gravity()
{
if (!IsGrounded()) velocity.y += gravity * Time.deltaTime;
else if (velocity.y < 0) velocity.y = -2;
controller.Move(velocity * Time.deltaTime);
}
private void OnDrawGizmos()
{
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(spherePos, controller.radius - 0.05f);
}
}
anneyong, try this bro:
public class MovementStateManager : MonoBehaviour
{
#region Movement
public float currentMoveSpeed;
public float walkSpeed = 1, walkBackSpeed = 1;
public float runSpeed = 3, runBackSpeed = 3;
public float crouchSpeed = 2, crouchBackSpeed = 1;
[HideInInspector] public Vector3 dir;
[HideInInspector] public float hzInput, vInput;
CharacterController controller;
#endregion
[SerializeField]float groundYOffset;
[SerializeField] LayerMask groundMask;
Vector3 spherePos;
[SerializeField] float gravity = -9.81f;
Vector3 velocity;
MovementBaseState currentState;
public IdleState Idle = new IdleState();
public WalkState Walk = new WalkState();
public CrouchState Crouch = new CrouchState();
public RunState Run = new RunState();
[HideInInspector] public Animator anim;
// Start is called before the first frame update
void Start()
{
anim = GetComponentInChildren();
controller = GetComponent();
SwitchState(Idle);
}
// Update is called once per frame
void Update()
{
GetDirectionAndMove();
Gravity();
anim.SetFloat("hzInput", hzInput);
anim.SetFloat("vInput", vInput);
currentState.UpdateState(this);
}
public void SwitchState(MovementBaseState state)
{
currentState = state;
currentState.EnterState(this);
}
void GetDirectionAndMove()
{
hzInput = Input.GetAxis("Horizontal");
vInput = Input.GetAxis("Vertical");
dir = transform.forward * vInput + transform.right * hzInput;
controller.Move(dir.normalized * currentMoveSpeed * Time.deltaTime);
}
bool IsGrounded()
{
spherePos = new Vector3(transform.position.x, transform.position.y - groundYOffset, transform.position.z);
if (Physics.CheckSphere(spherePos, controller.radius - 0.05f, groundMask)) return true;
return false;
}
void Gravity()
{
if(!IsGrounded()) velocity.y += gravity * Time.deltaTime;
else if (velocity.y < 0) velocity.y = -2;
controller.Move(velocity * Time.deltaTime);
}
private void OnDrawGizmos()
{
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(spherePos, controller.radius - 0.05f);
}
}
@@Dominicn123 Thanks for the help! I really appreciate it!
What do you use for the code?
vs code
I’m using visual studio 2022 in this video
You don't even have to make a ground check. The Unity CharacterController has it's build in controller.isGrounded. You can just check that with an if statement and handle the rest of the logic in there.
I didn’t know this but I did it the way I did it to make sure you can’t infinite jump up walls
why the MonoBehaviour is white and not blue? same for other things they are white not grey
asking bc the script isnt working without these
If you go on Unity and click file/project settings/ external tools. Do you have your IDE selected in the drop down?
@@gaddgames wait unity hub or the project?
@@Gli_sck when your in the project. If you still need help send me a message on discord and I can help you get it sorted
@@gaddgames oh i discovered how to fix that, thanks for replying you're a very good youtuber:)
everything works ok apart from the movement it doesn't go in proper direction
That was my mums favourite part of the video, in the future I am going to edit it less so I will show that I am no genius and it takes time, effort and persistence. I am still learning and always will be
Thanks for the tutorial, btw, i use rigidbody, so i can't follow 3/4 of the tutorial :(
Might have to make a rigid body movement tutorial 🤔
I HAVE A 22 COMPILLER ERRORS🤧🤧🤧
Can someone sent a working code pls?
Aus spaß macht sowas keiner kein verbrechen ohne das man was verdient !
Yet another tutorial that doesn't work (probably due to Unity's constant annoying updates). It wouldn't let me add a CineMachine Virtual Camera unless I parented it to an object on the hierarchy and it's symbol doesn't appear next to the main camera and it doesn't function. I'm so sick of unity's bullcrap.
I’ll have a look into it and see if I can find a fix for you
@@gaddgames Never Mind, I got it to work! For some reason, if I selected it in the Component Tab from the tab, it would be grayed out and not selectable unless I parented it to an object in the hierarchy, in which case it wouldn't work. However, when I right-clicked the Hierarchy and selected Cinemachine and virtual camera from there, it worked just as you showed. Thank you for your attempted support regardless!
public float moveSpeed = 3f;
[HideInInspector] public Vector3 dir;
float hzInput, vInput;
CharacterController controller;
[SerializedField] float groundYOffset;
[SerializedField] LayerMask groundMask;
Vector3 spherePos;
[SerializedField] float gravity =-9.81f;
Vector3 velocity;
only moveSpeed is showing in inspector. why?????
Serialize instead of Serialized
Go to file at the top left of Unity then preferences/ external tools, then select your IDE from the drop down menu then regenerate project files then it should make things easier to follow along with
@@gaddgames oh shit. lmfao thank you. Can't believe I did that. its My intellisense that seems to be screwing me over and I didn't look properly
@@gaddgames I did that now. its not that. there is something wrong with the assemblies not showing up for me for some reason. I had a fix for it but that doesn't seem to be an option for me sadly. do you have a discord?
Yeah there is a link to it on my channel banner thing
is this series suitable for beginners
I wouldn’t recommend for absolute beginners but definitely with a basic knowledge of unity you could follow along
@@gaddgames iam a absolute beginner which series shopuld i watch for unity (other than brackeys )i like to learn 3d stuff not 2d games
What I did to start learning was the create with code course on the Unity learn website was very helpful and simple to understand
Why do you not use rigibody??
What language is he using
C#
i got some error that said:
nullreferenceException: object reference not set to an instance of an object movementStateManager.OnDrawGizmos
can someone help me
Run the game and it will go away and when you have set it up just comment out the code and it will go away
When im testing
6 Jahre Bau wenn du in ein fremdes netzwerkt eindringst !! :)
kam ni kitta :(
何が問題ですか
why does unity take fucking forever to do anything
This video is not for beginner
My character is not moving
I dont understand why ur voice is low please before making any tutorial at least check your sound
NullReferenceException: Object reference not set to an instance of an object
MovementStateManagement.OnDrawGizmos () (at Assets/MovementStateManagement.cs:60)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) i have this problem how i can fix
did you get this fixed? pls help a fellow out if so
ay man im stuck at 14:00 i cant play bc it automaticly pauses the game and when i try to unpause it gives me an error saying: System.ArgumentException: Input Axis Mouse Y is not setup. can you help me out please?
nwm did it myself lol
@Kapsuva81165 good job 😁