@@OneMonthStudio Thank you. :) It was more for myself, than anything. I watched your tutorial and made the controller, but after deleting it and trying to remake it for practice, I totally forgot. lol But I think I got the gist of it now. Now I have to figure out how to make a gun shoot. Whats the best method for that? Raycasting or something less expensive on cpu?
@@FictitiousCtrlGames Hmmm, I might make a tutorial on that soon. I have a few methods of doing shooter mechanics, both with bullets and raycasting. So be on the lookout for that very soon.
Thanks for the tutorial, I learned a lot as a beginner! Also, to fix the camera when looking directly straight up or down just: Set the "minimum Y and maximum Y" of the Mouse Look - Camera to -90 and 90 respectively.
On 25:05, why do you assign the X and Z value to None ? I suppose it should have assigned axisHorizontal to X and axisVertical to Z doesn't? i am not really sure what i didn't grasp here
Good question. We assign the axisHorizontal and axisVertical to the axisVertical vector3 as we did above, otherwise we won't be able to clamp it's magnitude. Because if we only do it once within our movementVector, even gravity will be clamped and that's what we're trying to avoid. So you need to assign the axis floats to a separat vector3 and clamp it, to then assign that clamped vector3 to a different vector3 by using 'Set Vector3 XYZ', and assign gravity to our new vector3's Y component. All to avoid clamping gravity to 1.
Remember to set the mouselook that pans the camera horizontally to only affect the playercharacter and not the camera. Since we've got the camera as a child of the player, when the player turns, the camera will turn with the player.
Okay so i had to install the new input system (Available in Package manager for free, like Probuilder) But i had the vjoy error. so i just have to update it to the latest version available atm (1.2.0) Now everything work like a charm, thanks for the tutorial !
I am trying to use your tutorial with Unity 2019, and I installed the input manager and Playmaker. However, the actions for Playmaker don't seem to come with the input manager, and I can't find anything about this anywhere. First, should I use the version of Unity that you're using if it's broken in newer versions, and is there somewhere that I should be looking for a plugin for Playmaker that makes the input manager work with it?
Just use the built-in input manager, and use the standard input actions in playmaker. The input manager that I use is broken in newer version of unity, so I'd just use built-in input manager.
Hi, sure can. It's a bad habit because then it relies on the object being in the scene in the first place, this plays badly with prefabs. If we tell our script to look for a specific object, we can use it during create object or object pooling (spawning object for later use). We tell the script what to look for within the scene based on a name and a tag, and thus we don't have to rely on it being the same object every time. We can change the object, without having to keep dragging it into the action. Hope that clears things up.
@@OneMonthStudio cool. on a similar note, is it better to use "find object" to gather game objects upon scene start, or is it better to assign them to a variable in the fsm? when you say, "dragging onto the fsm window" are you referring to what you showed, or also dragging it into the variables tab to create a new named variable, then using that? I heard that using the Find Object is really expensive, so I've been dragging them into the VARIABLE WINDOW to create the variables ahead of time that way, rather than using Find Object.
@@westingtyler1 Yes using 'Find Object' is expensive, and that is why we only do it once every now and then. Best used at the start of the scene, or sparingly. Same goes for creating objects that aren't pooled, that will cause a frame stutter as the information is written to ram from harddrive. By "dragging into the fsm window" I mean any variable that relies on a specific object, because in most cases you want it to be dynamic. So yes, both what I showed and into the variable window. But because 'Find Object' is kinda expensive, we only use it sparingly, and for things that are dynamically changing. It's just a bad habit to rely on some objects to be within the scene. If you wanted to create an object later, you'd need to look for it or set up an elaborate maze of a script to send the created object to whatever needs it.
so I followed your tutorial which btw is great. but i ran into a snag. my y camera movement was inverses(when mouse was moved up camera went down and vice versa) when i put the positive 2 where you had it for the camera look. the obvious fix was inverting the value to get the desired effect. but i was wondering if that was a bug just for me or do you use inverse y axis for most games you play.
excuse me, could you help me here? I did something similar to what did and everything worked fine except for one. when I rotate the mouse the player doesn't rotate. so when I move the camera to the right and press (W) the player move to the left. I didn't use a rigidbody to freeze the axis and I can't think of any other reason it didn't work. any help is much appreciated.
oh, it seems that the problem was caused by the character controller component. Space had to be (self) for the movement vector to be relative to the player, not the world
OMG I followed everything, but somewhere I must have missed something because, I'm able to move the camera left and right with the mouse, but it won't go Up and Down. Any suggestions? I keep rewatching the video and just can't seem to pin-point where I messed up at.
Ok, it looks like for some reason, under the "Mouse Look - Player" when I make adjustments to the sensitivity of the "Mouse X," it changes the sensitivity of the Y axis. I clearly have the X set to a value and the Y to zero, but it seems to be reacting to the Y Axis for some reason.
Setting variables isn't so much of a "nono", but less flexible if you want the variable to be set dynamically. Say if you're building a game out of chunks, where you load parts separately, then you can't rely on setting the variable beforehand, you'd have to look for what to fill that variable with at runtime. Remember to get a child that has the right tag and name, otherwise you're not going to find the child you're looking for.
@@OneMonthStudio Thank you sir. Everything now works because now I understand how this system works. I thoughts the opposite was true. The name was the new name for the object we look for as a child. Some name changing so it would get less confusing and it works.
THanks for the effort, but PLEASE write yourself a script first next time. 75% of the time you're just rambling, unsure about what to say next. It's quite excruciating.
For Referencing Later
Get Axis: 9:15
Controller Move: 11:30
Set Vector XYZ: 12:42
Gravity: 15:29
Nice work!
@@OneMonthStudio Thank you. :) It was more for myself, than anything. I watched your tutorial and made the controller, but after deleting it and trying to remake it for practice, I totally forgot. lol But I think I got the gist of it now.
Now I have to figure out how to make a gun shoot. Whats the best method for that?
Raycasting or something less expensive on cpu?
@@FictitiousCtrlGames Hmmm, I might make a tutorial on that soon.
I have a few methods of doing shooter mechanics, both with bullets and raycasting.
So be on the lookout for that very soon.
@@OneMonthStudio Awesome! I'm excite!
Finally. After one day waste of following out of date or not working tutorials this is gold
Thanks for the tutorial, I learned a lot as a beginner!
Also, to fix the camera when looking directly straight up or down just:
Set the "minimum Y and maximum Y" of the Mouse Look - Camera to -90 and 90 respectively.
Very nice and helpful tutorial, thank you!
is there anything on looping a sound (footsteps) on button down? im having problems..
Thanks for great tutorial. But I have a question.
How do I make stop moving if I press the A key after I press the D key? (Also in the opposite case)
On 25:05, why do you assign the X and Z value to None ? I suppose it should have assigned axisHorizontal to X and axisVertical to Z doesn't? i am not really sure what i didn't grasp here
Good question.
We assign the axisHorizontal and axisVertical to the axisVertical vector3 as we did above, otherwise we won't be able to clamp it's magnitude. Because if we only do it once within our movementVector, even gravity will be clamped and that's what we're trying to avoid.
So you need to assign the axis floats to a separat vector3 and clamp it, to then assign that clamped vector3 to a different vector3 by using 'Set Vector3 XYZ', and assign gravity to our new vector3's Y component.
All to avoid clamping gravity to 1.
The tutorials are awesome! Thank you so much! Can you make a 3rd person controller tutorial? I'd buy that in a heartbeat.
Super tutorial , a big Thank you ,, :)
Can you do tutorial about Animations please. wana know how animations work with FPS examples.
Im able to move and turn my camera but when I walk and turn my camera the direction Im walking doesnt change. What can I do to fix that?
Remember to set the mouselook that pans the camera horizontally to only affect the playercharacter and not the camera. Since we've got the camera as a child of the player, when the player turns, the camera will turn with the player.
thanks!! its useful!!
Thank you very much for this tutorial!
This is a great tutorial, thank you. Any tips on applying the mouselook to extend to a gamepad?
Get Axis didn't worked for me, i pressed all my keyboard&mouse, The character didn't wanna move..
Okay so i had to install the new input system (Available in Package manager for free, like Probuilder)
But i had the vjoy error. so i just have to update it to the latest version available atm (1.2.0)
Now everything work like a charm, thanks for the tutorial !
Great tutorial thanks for the help!
related question : how would I go about having the character controller move slower when going backward ?
Thanks you very much for tutorial😘😘😘😘
I can not find hardshell in unity 2019 version. Please advise. Thanks.
I said I was using a thirdparty input manager, yours would be just the regular input actions like 'get axis'.
I am trying to use your tutorial with Unity 2019, and I installed the input manager and Playmaker. However, the actions for Playmaker don't seem to come with the input manager, and I can't find anything about this anywhere. First, should I use the version of Unity that you're using if it's broken in newer versions, and is there somewhere that I should be looking for a plugin for Playmaker that makes the input manager work with it?
try hitting reset on the input manager, go to Edit, then project setttings, look for the cog icon in the top right, click it and hit reset
Just use the built-in input manager, and use the standard input actions in playmaker.
The input manager that I use is broken in newer version of unity, so I'd just use built-in input manager.
Can i use get axis vector instead of get axis with set vector?
Gravity at 15:29 to 20:58
how can i attach to a virtual joystick?
Not sure, you'd probably have to get something off the assetstore for that.
nice, but you should explain WHY dragging an object into the fsm window is bad, rather than just saying it's bad.
Hi, sure can.
It's a bad habit because then it relies on the object being in the scene in the first place, this plays badly with prefabs.
If we tell our script to look for a specific object, we can use it during create object or object pooling (spawning object for later use).
We tell the script what to look for within the scene based on a name and a tag, and thus we don't have to rely on it being the same object every time. We can change the object, without having to keep dragging it into the action.
Hope that clears things up.
@@OneMonthStudio cool. on a similar note, is it better to use "find object" to gather game objects upon scene start, or is it better to assign them to a variable in the fsm? when you say, "dragging onto the fsm window" are you referring to what you showed, or also dragging it into the variables tab to create a new named variable, then using that? I heard that using the Find Object is really expensive, so I've been dragging them into the VARIABLE WINDOW to create the variables ahead of time that way, rather than using Find Object.
@@westingtyler1
Yes using 'Find Object' is expensive, and that is why we only do it once every now and then. Best used at the start of the scene, or sparingly. Same goes for creating objects that aren't pooled, that will cause a frame stutter as the information is written to ram from harddrive.
By "dragging into the fsm window" I mean any variable that relies on a specific object, because in most cases you want it to be dynamic. So yes, both what I showed and into the variable window.
But because 'Find Object' is kinda expensive, we only use it sparingly, and for things that are dynamically changing.
It's just a bad habit to rely on some objects to be within the scene. If you wanted to create an object later, you'd need to look for it or set up an elaborate maze of a script to send the created object to whatever needs it.
Learned a lot! Thank you!
Great tutorials, any advice going for a head bob with the camera?
add a simple script : when player move -> move the camera (value=they way u want to);
Dont forget to loop it + Force finish animation/the loop before to listen if the player is moving and start a new loop
so I followed your tutorial which btw is great. but i ran into a snag.
my y camera movement was inverses(when mouse was moved up camera went down and vice versa) when i put the positive 2 where you had it for the camera look.
the obvious fix was inverting the value to get the desired effect.
but i was wondering if that was a bug just for me or do you use inverse y axis for most games you play.
Might be a bug with one of the actions, try one of the other mouse look action/s, I think Playmaker comes with 2 different ones.
excuse me, could you help me here? I did something similar to what did and everything worked fine except for one. when I rotate the mouse the player doesn't rotate. so when I move the camera to the right and press (W) the player move to the left.
I didn't use a rigidbody to freeze the axis and I can't think of any other reason it didn't work. any help is much appreciated.
it seems like that the player is rotating, But the movement vector is not related to the direction the character is facing
oh, it seems that the problem was caused by the character controller component. Space had to be (self) for the movement vector to be relative to the player, not the world
@@androidemulation5952 Thanks I had this problem to and that fixed it.
@@ivehadenough3030 Glad it helped
out of curiosity, Where did you find that Complete Control thing? I can't find it anywhere.
It's an addon called Input Manager CC. It requires a little bit of tweaking to get it to work, but it's a handy input manager addon.
Thank you so very very much!
please make a third person controller
OMG I followed everything, but somewhere I must have missed something because, I'm able to move the camera left and right with the mouse, but it won't go Up and Down. Any suggestions?
I keep rewatching the video and just can't seem to pin-point where I messed up at.
Ok, it looks like for some reason, under the "Mouse Look - Player" when I make adjustments to the sensitivity of the "Mouse X," it changes the sensitivity of the Y axis. I clearly have the X set to a value and the Y to zero, but it seems to be reacting to the Y Axis for some reason.
I figured it out!!!!! LOL
Under the "Get Child" action, I had the "Child" name wrong. when I corrected it, everything worked correctly!
@@edcosine 👍
@@OneMonthStudio Ok, I'm heading over to the second video. So excited !!!
@@edcosine u so lucky man im having your issue to bro i cant look up and down. the child name for me isnt wrong :(
thanks for this tutorial ,but scripting is easer and faster , can be done within 8 lines of simple codes to do all of that actions ..
The child didn't work for me... however the big "nono" actually did... so I guess I'm a sinner.
Setting variables isn't so much of a "nono", but less flexible if you want the variable to be set dynamically.
Say if you're building a game out of chunks, where you load parts separately, then you can't rely on setting the variable beforehand, you'd have to look for what to fill that variable with at runtime.
Remember to get a child that has the right tag and name, otherwise you're not going to find the child you're looking for.
@@OneMonthStudio Thank you sir. Everything now works because now I understand how this system works. I thoughts the opposite was true. The name was the new name for the object we look for as a child.
Some name changing so it would get less confusing and it works.
mine is not moving
i followed every step but no good but the tutorial is understandable
Did you ever manage to fix this problem? I'm having the same problem and I tried everything.
You not use Magnitude, for make Animations for Player.
What is hardshell ??
It's an input manager, a useful tool if you don't want to use the built-in Unity input manager.
Gravity doesn't work for me
It should if you did it as I did.
@@OneMonthStudio Which keywords to move forward. I only can move left (A letter), Move right (D). Backward and forward can not.
@@KimCucnailshopduncanville Forward and backwards is 'Vertical', while sideways is 'Horizontal'.
10,000th
THanks for the effort, but PLEASE write yourself a script first next time. 75% of the time you're just rambling, unsure about what to say next. It's quite excruciating.
I agree :)
Stop abusing ur Mose
Haha yeah I know.
I had to place the mic close to the mouse for this record.
@@OneMonthStudio XD
말 진짜 ㅈㄴ 느리네